[OE-core] [PATCH][RFC] base: don't prefix/suffix packages when expanding PACKAGECONFIG

Ross Burton ross.burton at intel.com
Mon Nov 30 22:54:45 UTC 2015


When handling PACKAGECONFIG don't add nativesdk- prefixes or -native suffixes to
packages, as the classexpand logic will run next and so the same operation
again.

Apart from removing redundant code, this also fixes a bug where the nativesdk-
prefix was being added twice in some situations, resulting in dependencies on
virtual/nativesdk-nativesdk-libx11.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/base.bbclass | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e6d1599..4af5ee1 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -355,32 +355,9 @@ python () {
 
         mlprefix = d.getVar("MLPREFIX", True)
 
-        def expandFilter(appends, extension, prefix):
-            appends = bb.utils.explode_deps(d.expand(" ".join(appends)))
-            newappends = []
-            for a in appends:
-                if a.endswith("-native") or ("-cross-" in a):
-                    newappends.append(a)
-                elif a.startswith("virtual/"):
-                    subs = a.split("/", 1)[1]
-                    newappends.append("virtual/" + prefix + subs + extension)
-                else:
-                    if a.startswith(prefix):
-                        newappends.append(a + extension)
-                    else:
-                        newappends.append(prefix + a + extension)
-            return newappends
-
         def appendVar(varname, appends):
             if not appends:
                 return
-            if varname.find("DEPENDS") != -1:
-                if pn.startswith("nativesdk-"):
-                    appends = expandFilter(appends, "", "nativesdk-")
-                if pn.endswith("-native"):
-                    appends = expandFilter(appends, "-native", "")
-                if mlprefix:
-                    appends = expandFilter(appends, "", mlprefix)
             varname = d.expand(varname)
             d.appendVar(varname, " " + " ".join(appends))
 
-- 
2.1.4




More information about the Openembedded-core mailing list