Skip to contentSkip to conversation

native: fix incorrect addition of -native suffix

PATCH New Ed Bartosh 1 participant 1 message Dec 31, 2015

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 native: fix incorrect addition of -native suffix

The code in native.bbclass adds -native suffix for recipes that don't have it. If native package doesn't have this suffix it will be added to it. For example perl-native-runtime becomes perl-native-runtime-native because of this.

Added check to -native- in the recipe name to prevent addition of -native suffix.

---
 meta/classes/native.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/native.bbclass +2 -2
index aac2c1e..8bb3244 100644
@@ -120,7 +120,7 @@ python native_virtclass_handler () {
         return
 
     pn = e.data.getVar("PN", True)
-    if not pn.endswith("-native"):
+    if not (pn.endswith("-native") or "-native-" in pn):
         return
 
     def map_dependencies(varname, d, suffix = ""):
@@ -136,7 +136,7 @@ python native_virtclass_handler () {
                 continue
             elif "-cross-" in dep:
                 newdeps.append(dep.replace("-cross", "-native"))
-            elif not dep.endswith("-native"):
+            elif not (dep.endswith("-native") or "-native-" in dep):
                 newdeps.append(dep + "-native")
             else:
                 newdeps.append(dep)
Signature · 1 line
2.1.4