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/osc.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/osc.py')
-rw-r--r-- | bitbake/lib/bb/fetch/osc.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch/osc.py b/bitbake/lib/bb/fetch/osc.py index ed773939b0..6fcb344ce0 100644 --- a/bitbake/lib/bb/fetch/osc.py +++ b/bitbake/lib/bb/fetch/osc.py | |||
@@ -8,6 +8,7 @@ Based on the svn "Fetch" implementation. | |||
8 | 8 | ||
9 | import os | 9 | import os |
10 | import sys | 10 | import sys |
11 | import logging | ||
11 | import bb | 12 | import bb |
12 | from bb import data | 13 | from bb import data |
13 | from bb.fetch import Fetch | 14 | from bb.fetch import Fetch |
@@ -91,22 +92,22 @@ class Osc(Fetch): | |||
91 | Fetch url | 92 | Fetch url |
92 | """ | 93 | """ |
93 | 94 | ||
94 | bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory '" + ud.moddir + "'") | 95 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") |
95 | 96 | ||
96 | if os.access(os.path.join(data.expand('${OSCDIR}', d), ud.path, ud.module), os.R_OK): | 97 | if os.access(os.path.join(data.expand('${OSCDIR}', d), ud.path, ud.module), os.R_OK): |
97 | oscupdatecmd = self._buildosccommand(ud, d, "update") | 98 | oscupdatecmd = self._buildosccommand(ud, d, "update") |
98 | bb.msg.note(1, bb.msg.domain.Fetcher, "Update "+ loc) | 99 | logger.info("Update "+ loc) |
99 | # update sources there | 100 | # update sources there |
100 | os.chdir(ud.moddir) | 101 | os.chdir(ud.moddir) |
101 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % oscupdatecmd) | 102 | logger.debug(1, "Running %s", oscupdatecmd) |
102 | runfetchcmd(oscupdatecmd, d) | 103 | runfetchcmd(oscupdatecmd, d) |
103 | else: | 104 | else: |
104 | oscfetchcmd = self._buildosccommand(ud, d, "fetch") | 105 | oscfetchcmd = self._buildosccommand(ud, d, "fetch") |
105 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) | 106 | logger.info("Fetch " + loc) |
106 | # check out sources there | 107 | # check out sources there |
107 | bb.mkdirhier(ud.pkgdir) | 108 | bb.mkdirhier(ud.pkgdir) |
108 | os.chdir(ud.pkgdir) | 109 | os.chdir(ud.pkgdir) |
109 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % oscfetchcmd) | 110 | logger.debug(1, "Running %s", oscfetchcmd) |
110 | runfetchcmd(oscfetchcmd, d) | 111 | runfetchcmd(oscfetchcmd, d) |
111 | 112 | ||
112 | os.chdir(os.path.join(ud.pkgdir + ud.path)) | 113 | os.chdir(os.path.join(ud.pkgdir + ud.path)) |