Skip to contentSkip to conversation

siggen: Fix clean_basepath handling for virtual:X: dependencies

PATCH New Richard Purdie 1 participant 1 message Aug 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 siggen: Fix clean_basepath handling for virtual:X: dependencies

It looks like at some point this code assumed base filenames but ended up with task dependencies appended. This added an extra ":" element to the name which broke the virtual:X: namespace handling.

An example reported by Jean-Francois Dagenais <[email protected]>:

virtual:native:/full/path/to/recipes-example/helloworld/helloworld_1.2.3.bb:do_compile

would get incorrectly "cleaned" into:

helloworld/helloworld_1.2.3.bb:do_compile:virtual:native:/full/path/to/recipes-example/helloworld/helloworld_1.2.3.bb

Make the code clearer by extracting the specific element we want to add here, mirroring the way multiconfig is handled.

---
 lib/bb/siggen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/siggen.py +1 -1
index 4c63b0baad..df762fa226 100644
@@ -752,7 +752,7 @@ def clean_basepath(a):
         _, mc, a = a.split(":", 2)
     b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2]
     if a.startswith("virtual:"):
-        b = b + ":" + a.rsplit(":", 1)[0]
+        b = b + ":virtual:" + a.split(":", 2)[1]
     if mc:
         b = b + ":mc:" + mc
     return b
Signature · 1 line
2.25.1