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/git.py | |
parent | d3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff) | |
download | openembedded-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/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch/git.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index 9bd447ff8..57d758dcd 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py @@ -25,6 +25,7 @@ import bb from bb import data from bb.fetch import Fetch from bb.fetch import runfetchcmd +from bb.fetch import logger class Git(Fetch): """Class to fetch a module or modules from git repositories""" @@ -153,7 +154,7 @@ class Git(Fetch): os.chdir(ud.clonedir) mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) if mirror_tarballs != "0" or 'fullclone' in ud.parm: - bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository") + logger.info("Creating tarball of git repository") runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d) if 'fullclone' in ud.parm: @@ -185,7 +186,7 @@ class Git(Fetch): runfetchcmd("%s checkout-index -q -f --prefix=%s -a" % (ud.basecmd, coprefix), d) os.chdir(codir) - bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git checkout") + logger.info("Creating tarball of git checkout") runfetchcmd("tar -czf %s %s" % (ud.localpath, os.path.join(".", "*") ), d) os.chdir(ud.clonedir) @@ -238,7 +239,7 @@ class Git(Fetch): print("no repo") self.go(None, ud, d) if not os.path.exists(ud.clonedir): - bb.msg.error(bb.msg.domain.Fetcher, "GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value" % (url, ud.clonedir)) + logger.error("GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value", url, ud.clonedir) return None @@ -250,5 +251,5 @@ class Git(Fetch): os.chdir(cwd) buildindex = "%s" % output.split()[0] - bb.msg.debug(1, bb.msg.domain.Fetcher, "GIT repository for %s in %s is returning %s revisions in rev-list before %s" % (url, ud.clonedir, buildindex, rev)) + logger.debug(1, "GIT repository for %s in %s is returning %s revisions in rev-list before %s", url, ud.clonedir, buildindex, rev) return buildindex |