From 69f426a2d966a2228cbdc708b9ddab31005c6d96 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 18 May 2015 16:15:04 +0100 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/devtool/standard.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/lib/devtool/standard.py') 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: -- cgit 1.2.3-korg