summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-05-18 16:15:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-20 21:41:03 +0100
commit3d0418a3314e70242b347ad370cd268ed5783685 (patch)
treed53862bb9fb9c5de8abd42939546c81fa020228b /scripts
parentf30245774effc2d8e54386a8e2125555d5eaac93 (diff)
downloadpoky-3d0418a3314e70242b347ad370cd268ed5783685.tar.gz
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). (From OE-Core rev: 69f426a2d966a2228cbdc708b9ddab31005c6d96) 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__.py2
-rw-r--r--scripts/lib/devtool/standard.py7
-rwxr-xr-xscripts/recipetool2
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():
85 import bb.tinfoil 85 import bb.tinfoil
86 tinfoil = bb.tinfoil.Tinfoil() 86 tinfoil = bb.tinfoil.Tinfoil()
87 tinfoil.prepare(False) 87 tinfoil.prepare(False)
88 tinfoil.logger.setLevel(logging.WARNING) 88 tinfoil.logger.setLevel(logger.getEffectiveLevel())
89 return tinfoil 89 return tinfoil
90 90
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):
245 bb.utils.mkdirhier(srctree) 245 bb.utils.mkdirhier(srctree)
246 os.rmdir(srctree) 246 os.rmdir(srctree)
247 247
248 # We don't want notes to be printed, they are too verbose
249 origlevel = bb.logger.getEffectiveLevel()
250 if logger.getEffectiveLevel() > logging.DEBUG:
251 bb.logger.setLevel(logging.WARNING)
252
248 initial_rev = None 253 initial_rev = None
249 tempdir = tempfile.mkdtemp(prefix='devtool') 254 tempdir = tempfile.mkdtemp(prefix='devtool')
250 try: 255 try:
@@ -349,6 +354,8 @@ def _extract_source(srctree, keep_temp, devbranch, d):
349 shutil.move(srcsubdir, srctree) 354 shutil.move(srcsubdir, srctree)
350 logger.info('Source tree extracted to %s' % srctree) 355 logger.info('Source tree extracted to %s' % srctree)
351 finally: 356 finally:
357 bb.logger.setLevel(origlevel)
358
352 if keep_temp: 359 if keep_temp:
353 logger.info('Preserving temporary directory %s' % tempdir) 360 logger.info('Preserving temporary directory %s' % tempdir)
354 else: 361 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():
40 for plugin in plugins: 40 for plugin in plugins:
41 if hasattr(plugin, 'tinfoil_init'): 41 if hasattr(plugin, 'tinfoil_init'):
42 plugin.tinfoil_init(tinfoil) 42 plugin.tinfoil_init(tinfoil)
43 tinfoil.logger.setLevel(logging.WARNING) 43 tinfoil.logger.setLevel(logger.getEffectiveLevel())
44 44
45def main(): 45def main():
46 46