summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Francois Dagenais <jeff.dagenais@gmail.com>2020-08-20 17:50:00 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 12:29:50 +0100
commit2acfd66c9c79f989bf6dddc9f31a867f3d8e2602 (patch)
tree7288343842ea3012d146f9447cd066f2c96f6708
parentf2ae38a055f54640a968c4a8d5074f044202380e (diff)
downloadpoky-2acfd66c9c79f989bf6dddc9f31a867f3d8e2602.tar.gz
bitbake: siggen: clean_basepath: remove recipe full path when virtual:xyz present
Before this fix, this example basepath (a): 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 When searching backwards in `a` trying to isolate the 'virtual:xyz' to add it to the end of the string, we need to consider `a` still has the recipe path and taskname. So stoping the rsplit after only 1 split is not enough. We want to reach the second ':' from the end. This way, we obtain: helloworld/helloworld_1.2.3.bb:do_compile:virtual:native reviewed-by: Maxime Roussin-BĂ©langer <maxime.roussinbelanger@gmail.com> (Bitbake rev: befc11acd25a9d9a2d44c20a0e33ada740407af7) Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d193d93422a0ad62aa35b5d4ca5da8d422f72180) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/siggen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 94d1762df1..26fa7f05ce 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -706,7 +706,7 @@ def clean_basepath(a):
706 _, mc, a = a.split(":", 2) 706 _, mc, a = a.split(":", 2)
707 b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2] 707 b = a.rsplit("/", 2)[1] + '/' + a.rsplit("/", 2)[2]
708 if a.startswith("virtual:"): 708 if a.startswith("virtual:"):
709 b = b + ":" + a.rsplit(":", 1)[0] 709 b = b + ":" + a.rsplit(":", 2)[0]
710 if mc: 710 if mc:
711 b = b + ":mc:" + mc 711 b = b + ":mc:" + mc
712 return b 712 return b