]> code.ossystems Code Review - openembedded-core.git/commitdiff
base: check for existing prefix when expanding names in PACKAGECONFIG
authorRoss Burton <ross.burton@intel.com>
Tue, 1 Dec 2015 09:01:28 +0000 (09:01 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Dec 2015 08:47:27 +0000 (08:47 +0000)
When the DEPENDS are added as part of the PACKAGECONFIG logic the list of
packages are expanded so that any required nativesdk-/-native/multilib prefixes
and suffixes are added.

However the special handling of virtual/foo names doesn't check that the prefix
already exists, which breaks under nativesdk as in that situation there's an
explicit nativesdk- prefix *and* MLPREFIX is set to nativesdk-.  This results in
the same prefix being applied twice, and virtual packages such as virtual/libx11
ending up as virtual/nativesdk-nativesdk-libx11.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/base.bbclass

index 0d92948972f4c3c855bda26de264ed3f7d4d4081..f856298fb5f60acdda4d8fe27414bb0b3700b645 100644 (file)
@@ -381,7 +381,10 @@ python () {
                     newappends.append(a)
                 elif a.startswith("virtual/"):
                     subs = a.split("/", 1)[1]
-                    newappends.append("virtual/" + prefix + subs + extension)
+                    if subs.startswith(prefix):
+                        newappends.append(a + extension)
+                    else:
+                        newappends.append("virtual/" + prefix + subs + extension)
                 else:
                     if a.startswith(prefix):
                         newappends.append(a + extension)