]> code.ossystems Code Review - openembedded-core.git/commitdiff
native: remove PN from DEPENDS automatically
authorRoss Burton <ross.burton@intel.com>
Mon, 2 Feb 2015 11:03:28 +0000 (11:03 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Feb 2015 14:53:43 +0000 (14:53 +0000)
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.

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

index 4acc936ccd289e275855af5b925d24866d4a23d9..5ca5c95b4d3dee95197c75432cea799ef583a9b7 100644 (file)
@@ -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")