If a log level is set on the command line with -q/-d, set tinfoil's log level to the appropriate log level.
Fixes [YOCTO #11931] Signed-off-by: Amanda Brindle <amanda.r.brin...@intel.com> --- layerindex/recipeparse.py | 5 ++++- layerindex/utils.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py index f2a5235..af0c736 100644 --- a/layerindex/recipeparse.py +++ b/layerindex/recipeparse.py @@ -73,7 +73,10 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout saved_cwd = os.getcwd() os.chdir(tempdir) - tinfoil = utils.setup_tinfoil(bitbakepath, enable_tracking) + if logger: + tinfoil = utils.setup_tinfoil(bitbakepath, enable_tracking, loglevel=logger.getEffectiveLevel()) + else: + tinfoil = utils.setup_tinfoil(bitbakepath, enable_tracking) os.chdir(saved_cwd) diff --git a/layerindex/utils.py b/layerindex/utils.py index 2f9501c..e58d8f6 100644 --- a/layerindex/utils.py +++ b/layerindex/utils.py @@ -180,7 +180,7 @@ def set_layerbranch_collection_version(layerbranch, config_data, logger=None): ver_str += layerbranch.collection layerbranch.version = config_data.getVar(ver_str, True) -def setup_tinfoil(bitbakepath, enable_tracking): +def setup_tinfoil(bitbakepath, enable_tracking, loglevel=None): sys.path.insert(0, bitbakepath + '/lib') import bb.tinfoil import bb.cooker @@ -192,6 +192,9 @@ def setup_tinfoil(bitbakepath, enable_tracking): tinfoil = bb.tinfoil.Tinfoil() if enable_tracking: tinfoil.cooker.enableDataTracking() + tinfoil.logger.setLevel(logging.WARNING) + if loglevel: + tinfoil.logger.setLevel(loglevel) tinfoil.prepare(config_only = True) return tinfoil -- 2.7.4 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto