diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-05-18 16:15:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-19 08:16:47 +0100 |
commit | 69f426a2d966a2228cbdc708b9ddab31005c6d96 (patch) | |
tree | 14bb7223866ab9071400f08f768e53574af1507d /scripts | |
parent | 0c65e61d029e2c2293b072ff950aa825394abb79 (diff) | |
download | openembedded-core-69f426a2d966a2228cbdc708b9ddab31005c6d96.tar.gz openembedded-core-69f426a2d966a2228cbdc708b9ddab31005c6d96.tar.bz2 openembedded-core-69f426a2d966a2228cbdc708b9ddab31005c6d96.zip |
devtool / recipetool: ensure bb.note() gets printed
Most of the time when bb.note() gets called we want to see the output,
so ensure the level is set appropriately depending on the command line
options instead of being fixed at warning. (We don't want to see the
notes for fetch/unpack/patch though as they are too verbose).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 2 | ||||
-rw-r--r-- | scripts/lib/devtool/standard.py | 7 | ||||
-rwxr-xr-x | scripts/recipetool | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 5a06c78b57..9ec1ef6817 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py @@ -85,6 +85,6 @@ def setup_tinfoil(): import bb.tinfoil tinfoil = bb.tinfoil.Tinfoil() tinfoil.prepare(False) - tinfoil.logger.setLevel(logging.WARNING) + tinfoil.logger.setLevel(logger.getEffectiveLevel()) return tinfoil diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 61c0df9b11..122121aedb 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -245,6 +245,11 @@ def _extract_source(srctree, keep_temp, devbranch, d): bb.utils.mkdirhier(srctree) os.rmdir(srctree) + # We don't want notes to be printed, they are too verbose + origlevel = bb.logger.getEffectiveLevel() + if logger.getEffectiveLevel() > logging.DEBUG: + bb.logger.setLevel(logging.WARNING) + initial_rev = None tempdir = tempfile.mkdtemp(prefix='devtool') try: @@ -349,6 +354,8 @@ def _extract_source(srctree, keep_temp, devbranch, d): shutil.move(srcsubdir, srctree) logger.info('Source tree extracted to %s' % srctree) finally: + bb.logger.setLevel(origlevel) + if keep_temp: logger.info('Preserving temporary directory %s' % tempdir) else: diff --git a/scripts/recipetool b/scripts/recipetool index 2cfa763201..b7d3ee887c 100755 --- a/scripts/recipetool +++ b/scripts/recipetool @@ -40,7 +40,7 @@ def tinfoil_init(): for plugin in plugins: if hasattr(plugin, 'tinfoil_init'): plugin.tinfoil_init(tinfoil) - tinfoil.logger.setLevel(logging.WARNING) + tinfoil.logger.setLevel(logger.getEffectiveLevel()) def main(): |