Message ID | 20241118162610.1423384-1-alex.kanavin@gmail.com |
---|---|
State | Accepted, archived |
Commit | 06b8a18339434be8f754e534dacb790a2c9cb91d |
Headers | show |
Series | [v3,1/4] bitbake-layers: ensure tinfoil.shutdown() gets executed when tinfoil.prepare() fails | expand |
Hi Alex, > https://git.yocto/ > project.org%2Fpoky%2Fcommit%2Fbitbake%2Fbin%2Fbitbake- > layers%3Fid%3Df6de2b033d32c0f92f19f5a4a8c4c8874a00a8f7&data=05%7C02 > %7Cchris.laplante%40agilent.com%7C97e94e28efaa4067611208dd07edc001%7 > Ca9c0bc098b46420693512ba12fb4a5c0%7C0%7C0%7C638675439912466855% > 7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDA > wMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C > &sdata=Y05hVrsW%2Fo8KxXtUXrC62sAoPmA74U82IWtjyIGqxXo%3D&reserved= > 0 > erroneously moved tinfoil.prepare() out of try..finally block, where 'finally' > contains a tinfoil.shutdown() call. Why not just use a 'with' statement here? Thanks, Chris
On Mon, 25 Nov 2024 at 21:50, chris.laplante@agilent.com <chris.laplante@agilent.com> wrote: > > erroneously moved tinfoil.prepare() out of try..finally block, where 'finally' > > contains a tinfoil.shutdown() call. > > Why not just use a 'with' statement here? Perhaps; can you send a followup? This already merged. Alex
> > Why not just use a 'with' statement here? > > Perhaps; can you send a followup? This already merged. > > Alex Sure thing :). Thanks, Chris
diff --git a/bin/bitbake-layers b/bin/bitbake-layers index aebb5100c2c..613e675cb0d 100755 --- a/bin/bitbake-layers +++ b/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)