[bitbake-devel] siggen: Fix clean_basepath handling for virtual:X: dependencies

Submitted by Richard Purdie on Aug. 21, 2020, 2:15 p.m. | Patch ID: 175522

Details

Message ID 20200821141551.1278262-1-richard.purdie@linuxfoundation.org
State New
Headers show

Commit Message

Richard Purdie Aug. 21, 2020, 2:15 p.m.
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 <jeff.dagenais@gmail.com>:

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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/siggen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 4c63b0baad..df762fa226 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -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