| Message ID | 20251212190806.32476-4-osama.abdelkader@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | bitbake-layers: layerindex-fetch: respect --branch for already-configured layers | expand |
diff --git a/lib/bblayers/layerindex.py b/lib/bblayers/layerindex.py index 1c6511889d..e0df630a7f 100644 --- a/lib/bblayers/layerindex.py +++ b/lib/bblayers/layerindex.py @@ -120,7 +120,8 @@ class LayerIndexPlugin(ActionPlugin): # Fast path, check if we already have what has been requested! (dependencies, invalidnames) = cookerIndex.find_dependencies(names=args.layername, ignores=ignore_layers) - if not args.show_only and not invalidnames: + if not args.show_only and not invalidnames and not args.branch: + # Only skip if no specific branch was requested logger.plain("You already have the requested layer(s): %s" % args.layername) return 0
When --branch is specified, prevent the early exit that skips branch verification. This ensures that even if a layer is already in bblayers.conf, the command will still check and switch to the requested branch if needed. This fixes the issue where the command would exit early with "You already have the requested layer(s)" without verifying the branch. [YOCTO #7852] Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> --- lib/bblayers/layerindex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)