summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/fetch/svn.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:35:31 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:33 +0000
commitecc68fa4fbb579e97ea45156e79a293b073697a0 (patch)
tree6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/lib/bb/fetch/svn.py
parentd3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff)
downloadopenembedded-core-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.gz
openembedded-core-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.bz2
openembedded-core-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.xz
openembedded-core-ecc68fa4fbb579e97ea45156e79a293b073697a0.zip
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.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
index 375e8df05..34f813225 100644
--- a/bitbake/lib/bb/fetch/svn.py
+++ b/bitbake/lib/bb/fetch/svn.py
@@ -25,12 +25,14 @@ BitBake 'Fetch' implementation for svn.
import os
import sys
+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 runfetchcmd
+from bb.fetch import logger
class Svn(Fetch):
"""Class to fetch a module or modules from svn repositories"""
@@ -136,22 +138,22 @@ class Svn(Fetch):
def go(self, loc, ud, d):
"""Fetch url"""
- bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory '" + ud.moddir + "'")
+ logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK):
svnupdatecmd = self._buildsvncommand(ud, d, "update")
- bb.msg.note(1, bb.msg.domain.Fetcher, "Update " + loc)
+ logger.info("Update " + loc)
# update sources there
os.chdir(ud.moddir)
- bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svnupdatecmd)
+ logger.debug(1, "Running %s", svnupdatecmd)
runfetchcmd(svnupdatecmd, d)
else:
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
- bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc)
+ logger.info("Fetch " + loc)
# check out sources there
bb.mkdirhier(ud.pkgdir)
os.chdir(ud.pkgdir)
- bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svnfetchcmd)
+ logger.debug(1, "Running %s", svnfetchcmd)
runfetchcmd(svnfetchcmd, d)
os.chdir(ud.pkgdir)
@@ -179,7 +181,7 @@ class Svn(Fetch):
"""
Return the latest upstream revision number
"""
- bb.msg.debug(2, bb.msg.domain.Fetcher, "SVN fetcher hitting network for %s" % url)
+ logger.debug(2, "SVN fetcher hitting network for %s", url)
output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True)