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/svn.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/svn.py')
-rw-r--r-- | bitbake/lib/bb/fetch/svn.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py index 375e8df055..34f8132257 100644 --- a/bitbake/lib/bb/fetch/svn.py +++ b/bitbake/lib/bb/fetch/svn.py | |||
@@ -25,12 +25,14 @@ BitBake 'Fetch' implementation for svn. | |||
25 | 25 | ||
26 | import os | 26 | import os |
27 | import sys | 27 | import sys |
28 | import logging | ||
28 | import bb | 29 | import bb |
29 | from bb import data | 30 | from bb import data |
30 | from bb.fetch import Fetch | 31 | from bb.fetch import Fetch |
31 | from bb.fetch import FetchError | 32 | from bb.fetch import FetchError |
32 | from bb.fetch import MissingParameterError | 33 | from bb.fetch import MissingParameterError |
33 | from bb.fetch import runfetchcmd | 34 | from bb.fetch import runfetchcmd |
35 | from bb.fetch import logger | ||
34 | 36 | ||
35 | class Svn(Fetch): | 37 | class Svn(Fetch): |
36 | """Class to fetch a module or modules from svn repositories""" | 38 | """Class to fetch a module or modules from svn repositories""" |
@@ -136,22 +138,22 @@ class Svn(Fetch): | |||
136 | def go(self, loc, ud, d): | 138 | def go(self, loc, ud, d): |
137 | """Fetch url""" | 139 | """Fetch url""" |
138 | 140 | ||
139 | bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory '" + ud.moddir + "'") | 141 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") |
140 | 142 | ||
141 | if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): | 143 | if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): |
142 | svnupdatecmd = self._buildsvncommand(ud, d, "update") | 144 | svnupdatecmd = self._buildsvncommand(ud, d, "update") |
143 | bb.msg.note(1, bb.msg.domain.Fetcher, "Update " + loc) | 145 | logger.info("Update " + loc) |
144 | # update sources there | 146 | # update sources there |
145 | os.chdir(ud.moddir) | 147 | os.chdir(ud.moddir) |
146 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svnupdatecmd) | 148 | logger.debug(1, "Running %s", svnupdatecmd) |
147 | runfetchcmd(svnupdatecmd, d) | 149 | runfetchcmd(svnupdatecmd, d) |
148 | else: | 150 | else: |
149 | svnfetchcmd = self._buildsvncommand(ud, d, "fetch") | 151 | svnfetchcmd = self._buildsvncommand(ud, d, "fetch") |
150 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) | 152 | logger.info("Fetch " + loc) |
151 | # check out sources there | 153 | # check out sources there |
152 | bb.mkdirhier(ud.pkgdir) | 154 | bb.mkdirhier(ud.pkgdir) |
153 | os.chdir(ud.pkgdir) | 155 | os.chdir(ud.pkgdir) |
154 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svnfetchcmd) | 156 | logger.debug(1, "Running %s", svnfetchcmd) |
155 | runfetchcmd(svnfetchcmd, d) | 157 | runfetchcmd(svnfetchcmd, d) |
156 | 158 | ||
157 | os.chdir(ud.pkgdir) | 159 | os.chdir(ud.pkgdir) |
@@ -179,7 +181,7 @@ class Svn(Fetch): | |||
179 | """ | 181 | """ |
180 | Return the latest upstream revision number | 182 | Return the latest upstream revision number |
181 | """ | 183 | """ |
182 | bb.msg.debug(2, bb.msg.domain.Fetcher, "SVN fetcher hitting network for %s" % url) | 184 | logger.debug(2, "SVN fetcher hitting network for %s", url) |
183 | 185 | ||
184 | output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True) | 186 | output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True) |
185 | 187 | ||