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>
This commit is contained in:
Paul Eggleton authored and Richard Purdie committed 2015-05-20 21:41:03 +01:00
1 parent f30245774e
commit 3d0418a331
3 files changed
+9 -2

No files matched your search

+1 -1
View File
@@ -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
+7
View File
@@ -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:
+1 -1
View File
@@ -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():