Skip to contentSkip to conversation

native: remove PN from DEPENDS automatically

PATCH New Ross Burton 1 participant 1 message Feb 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 native: remove PN from DEPENDS automatically

If a recipe (say, wayland) has DEPENDS=wayland-native and BBCLASSEXTEND=native, when built as wayland-native it has DEPENDS=wayland-native which results in a circular dependency.

Typically this is resolved by having explicit DEPENDS_class-native statements but as this is duplication which can lead to inconsistent dependencies, automatically remove the circular dependency.

---
 meta/classes/native.bbclass |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/native.bbclass +3 -1
index 4acc936..5ca5c95 100644
@@ -132,7 +132,9 @@ python native_virtclass_handler () {
         deps = bb.utils.explode_deps(deps)
         newdeps = []
         for dep in deps:
-            if "-cross-" in dep:
+            if dep == pn:
+                continue
+            elif "-cross-" in dep:
                 newdeps.append(dep.replace("-cross", "-native"))
             elif not dep.endswith("-native"):
                 newdeps.append(dep + "-native")
Signature · 1 line
1.7.10.4