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/svk.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/svk.py')
-rw-r--r-- | bitbake/lib/bb/fetch/svk.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch/svk.py b/bitbake/lib/bb/fetch/svk.py index a17ac04d21..2754971eba 100644 --- a/bitbake/lib/bb/fetch/svk.py +++ b/bitbake/lib/bb/fetch/svk.py | |||
@@ -26,11 +26,13 @@ This implementation is for svk. It is based on the svn implementation | |||
26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
27 | 27 | ||
28 | import os | 28 | import os |
29 | import logging | ||
29 | import bb | 30 | import bb |
30 | from bb import data | 31 | from bb import data |
31 | from bb.fetch import Fetch | 32 | from bb.fetch import Fetch |
32 | from bb.fetch import FetchError | 33 | from bb.fetch import FetchError |
33 | from bb.fetch import MissingParameterError | 34 | from bb.fetch import MissingParameterError |
35 | from bb.fetch import logger | ||
34 | 36 | ||
35 | class Svk(Fetch): | 37 | class Svk(Fetch): |
36 | """Class to fetch a module or modules from svk repositories""" | 38 | """Class to fetch a module or modules from svk repositories""" |
@@ -72,19 +74,19 @@ class Svk(Fetch): | |||
72 | # create temp directory | 74 | # create temp directory |
73 | localdata = data.createCopy(d) | 75 | localdata = data.createCopy(d) |
74 | data.update_data(localdata) | 76 | data.update_data(localdata) |
75 | bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: creating temporary directory") | 77 | logger.debug(2, "Fetch: creating temporary directory") |
76 | bb.mkdirhier(data.expand('${WORKDIR}', localdata)) | 78 | bb.mkdirhier(data.expand('${WORKDIR}', localdata)) |
77 | data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata) | 79 | data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata) |
78 | tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false") | 80 | tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false") |
79 | tmpfile = tmppipe.readline().strip() | 81 | tmpfile = tmppipe.readline().strip() |
80 | if not tmpfile: | 82 | if not tmpfile: |
81 | bb.msg.error(bb.msg.domain.Fetcher, "Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.") | 83 | logger.error("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.") |
82 | raise FetchError(ud.module) | 84 | raise FetchError(ud.module) |
83 | 85 | ||
84 | # check out sources there | 86 | # check out sources there |
85 | os.chdir(tmpfile) | 87 | os.chdir(tmpfile) |
86 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) | 88 | logger.info("Fetch " + loc) |
87 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svkcmd) | 89 | logger.debug(1, "Running %s", svkcmd) |
88 | myret = os.system(svkcmd) | 90 | myret = os.system(svkcmd) |
89 | if myret != 0: | 91 | if myret != 0: |
90 | try: | 92 | try: |