diff options
author | Simone Weiß <simone.p.weiss@posteo.com> | 2024-04-19 20:08:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-08 14:51:43 +0100 |
commit | f6de2b033d32c0f92f19f5a4a8c4c8874a00a8f7 (patch) | |
tree | 1c6ac8c8206199fd714cb8c4b3e024df994bb5bb /bitbake/lib/bblayers | |
parent | 7eebbdb6c45149e8bf7abbf6a9f0c8068f7668f7 (diff) | |
download | poky-f6de2b033d32c0f92f19f5a4a8c4c8874a00a8f7.tar.gz |
bitbake: bitbake-layers: adapt force option to not use tinfoil
Fixes [YOCTO #15417]
When a layer adds a new dependency after it was added to a conf, it can not be
removed w/o this dependency in the setup. Even the dependent layer can not be
added, as the tinfoil setup will fail.
Adapt --force to not perform the tinfoil at all, the use will be at own risk,
i.e. the added layers might not parse properly afterwards.
This is not merged into the force option with -F as it even changes the loading of
plugins from other layers and is hence even more invasive as force. Instead
force can now be speciefied multiple times and is counted.
(Bitbake rev: 541fa7f582133949563e65f2d43c4b16e873e5c1)
Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bblayers')
-rw-r--r-- | bitbake/lib/bblayers/action.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bblayers/action.py b/bitbake/lib/bblayers/action.py index a8f2699335..a14f19948e 100644 --- a/bitbake/lib/bblayers/action.py +++ b/bitbake/lib/bblayers/action.py | |||
@@ -50,8 +50,8 @@ class ActionPlugin(LayerPlugin): | |||
50 | 50 | ||
51 | try: | 51 | try: |
52 | notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None) | 52 | notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None) |
53 | self.tinfoil.modified_files() | ||
54 | if not (args.force or notadded): | 53 | if not (args.force or notadded): |
54 | self.tinfoil.modified_files() | ||
55 | try: | 55 | try: |
56 | self.tinfoil.run_command('parseConfiguration') | 56 | self.tinfoil.run_command('parseConfiguration') |
57 | except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): | 57 | except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): |
@@ -83,6 +83,8 @@ class ActionPlugin(LayerPlugin): | |||
83 | layerdir = os.path.abspath(item) | 83 | layerdir = os.path.abspath(item) |
84 | layerdirs.append(layerdir) | 84 | layerdirs.append(layerdir) |
85 | (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs) | 85 | (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs) |
86 | if args.force > 1: | ||
87 | return 0 | ||
86 | self.tinfoil.modified_files() | 88 | self.tinfoil.modified_files() |
87 | if notremoved: | 89 | if notremoved: |
88 | for item in notremoved: | 90 | for item in notremoved: |