From 17f1b80c0619a7648a63cd7be597215ef1e39c60 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 18 Nov 2024 17:26:07 +0100 Subject: bitbake: bitbake-layers: ensure tinfoil.shutdown() gets executed when tinfoil.prepare() fails https://git.yoctoproject.org/poky/commit/bitbake/bin/bitbake-layers?id=f6de2b033d32c0f92f19f5a4a8c4c8874a00a8f7 erroneously moved tinfoil.prepare() out of try..finally block, where 'finally' contains a tinfoil.shutdown() call. Without the shutdown, if there is an error in tinfoil.prepare() (such as parsing errors), the tool locks up, as seen here: https://valkyrie.yoctoproject.org/#/builders/71/builds/431 (Bitbake rev: 06b8a18339434be8f754e534dacb790a2c9cb91d) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-layers | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index aebb5100c2..613e675cb0 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers @@ -59,13 +59,13 @@ def main(): plugins = [] tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) - if global_args.force > 1: - bbpaths = [] - else: - tinfoil.prepare(True) - bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') - - try: + try: + if global_args.force > 1: + bbpaths = [] + else: + tinfoil.prepare(True) + bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') + for path in ([topdir] + bbpaths): pluginpath = os.path.join(path, 'lib', 'bblayers') bb.utils.load_plugins(logger, plugins, pluginpath) -- cgit v1.2.3-54-g00ecf