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>
import bb.tinfoil
tinfoil = bb.tinfoil.Tinfoil()
tinfoil.prepare(False)
- tinfoil.logger.setLevel(logging.WARNING)
+ tinfoil.logger.setLevel(logger.getEffectiveLevel())
return tinfoil
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:
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:
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():