summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/svk.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:35:31 -0700
committerChris Larson <chris_larson@mentor.com>2010-09-03 18:51:54 -0700
commit3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d (patch)
tree1f77ebed5e5f48fd786286a51dd697113cb7ea28 /lib/bb/fetch/svk.py
parentc23c015cf8af1868faf293b19b80a5faf7e736a5 (diff)
downloadbitbake-3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d.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 Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/fetch/svk.py')
-rw-r--r--lib/bb/fetch/svk.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/bb/fetch/svk.py b/lib/bb/fetch/svk.py
index a17ac04d2..2754971eb 100644
--- a/lib/bb/fetch/svk.py
+++ b/lib/bb/fetch/svk.py
@@ -26,11 +26,13 @@ This implementation is for svk. It is based on the svn implementation
# Based on functions from the base bb module, Copyright 2003 Holger Schurig
import os
+import logging
import bb
from bb import data
from bb.fetch import Fetch
from bb.fetch import FetchError
from bb.fetch import MissingParameterError
+from bb.fetch import logger
class Svk(Fetch):
"""Class to fetch a module or modules from svk repositories"""
@@ -72,19 +74,19 @@ class Svk(Fetch):
# create temp directory
localdata = data.createCopy(d)
data.update_data(localdata)
- bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: creating temporary directory")
+ logger.debug(2, "Fetch: creating temporary directory")
bb.mkdirhier(data.expand('${WORKDIR}', localdata))
data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata)
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false")
tmpfile = tmppipe.readline().strip()
if not tmpfile:
- bb.msg.error(bb.msg.domain.Fetcher, "Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.")
+ logger.error("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.")
raise FetchError(ud.module)
# check out sources there
os.chdir(tmpfile)
- bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc)
- bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svkcmd)
+ logger.info("Fetch " + loc)
+ logger.debug(1, "Running %s", svkcmd)
myret = os.system(svkcmd)
if myret != 0:
try: