diff options
| author | Chris Larson <chris_larson@mentor.com> | 2010-06-10 10:35:31 -0700 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:33 +0000 |
| commit | ecc68fa4fbb579e97ea45156e79a293b073697a0 (patch) | |
| tree | 6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/lib/bb/fetch/cvs.py | |
| parent | d3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff) | |
| download | poky-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.gz | |
Switch bitbake internals to use logging directly rather than bb.msg
We use a custom Logger subclass for our loggers
This logger provides:
- 'debug' method which accepts a debug level
- 'plain' method which bypasses log formatting
- 'verbose' method which is more detail than info, but less than debug
(Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/cvs.py')
| -rw-r--r-- | bitbake/lib/bb/fetch/cvs.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py index 61976f7ef4..1064b09e11 100644 --- a/bitbake/lib/bb/fetch/cvs.py +++ b/bitbake/lib/bb/fetch/cvs.py | |||
| @@ -27,11 +27,10 @@ BitBake build tools. | |||
| 27 | # | 27 | # |
| 28 | 28 | ||
| 29 | import os | 29 | import os |
| 30 | import logging | ||
| 30 | import bb | 31 | import bb |
| 31 | from bb import data | 32 | from bb import data |
| 32 | from bb.fetch import Fetch | 33 | from bb.fetch import Fetch, FetchError, MissingParameterError, logger |
| 33 | from bb.fetch import FetchError | ||
| 34 | from bb.fetch import MissingParameterError | ||
| 35 | 34 | ||
| 36 | class Cvs(Fetch): | 35 | class Cvs(Fetch): |
| 37 | """ | 36 | """ |
| @@ -136,21 +135,21 @@ class Cvs(Fetch): | |||
| 136 | cvsupdatecmd = "CVS_RSH=\"%s\" %s" % (cvs_rsh, cvsupdatecmd) | 135 | cvsupdatecmd = "CVS_RSH=\"%s\" %s" % (cvs_rsh, cvsupdatecmd) |
| 137 | 136 | ||
| 138 | # create module directory | 137 | # create module directory |
| 139 | bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory") | 138 | logger.debug(2, "Fetch: checking for module directory") |
| 140 | pkg = data.expand('${PN}', d) | 139 | pkg = data.expand('${PN}', d) |
| 141 | pkgdir = os.path.join(data.expand('${CVSDIR}', localdata), pkg) | 140 | pkgdir = os.path.join(data.expand('${CVSDIR}', localdata), pkg) |
| 142 | moddir = os.path.join(pkgdir, localdir) | 141 | moddir = os.path.join(pkgdir, localdir) |
| 143 | if os.access(os.path.join(moddir, 'CVS'), os.R_OK): | 142 | if os.access(os.path.join(moddir, 'CVS'), os.R_OK): |
| 144 | bb.msg.note(1, bb.msg.domain.Fetcher, "Update " + loc) | 143 | logger.info("Update " + loc) |
| 145 | # update sources there | 144 | # update sources there |
| 146 | os.chdir(moddir) | 145 | os.chdir(moddir) |
| 147 | myret = os.system(cvsupdatecmd) | 146 | myret = os.system(cvsupdatecmd) |
| 148 | else: | 147 | else: |
| 149 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) | 148 | logger.info("Fetch " + loc) |
| 150 | # check out sources there | 149 | # check out sources there |
| 151 | bb.mkdirhier(pkgdir) | 150 | bb.mkdirhier(pkgdir) |
| 152 | os.chdir(pkgdir) | 151 | os.chdir(pkgdir) |
| 153 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % cvscmd) | 152 | logger.debug(1, "Running %s", cvscmd) |
| 154 | myret = os.system(cvscmd) | 153 | myret = os.system(cvscmd) |
| 155 | 154 | ||
| 156 | if myret != 0 or not os.access(moddir, os.R_OK): | 155 | if myret != 0 or not os.access(moddir, os.R_OK): |
