Skip to contentSkip to conversation

native: Move virtclass override to earlier so DEPENDS is handled correctly

PATCH New Richard Purdie 1 participant 1 message Jul 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 native: Move virtclass override to earlier so DEPENDS is handled correctly

Currently the virtclass override is added too late to be taken into account when DEPENDS and other variables are processed by the virtclass extension code. This sets the overrides in a more optimal place, meaning they are accounted for in variables like DEPENDS.

Recipes in meta-oe like libwmf-native showed the issue.

meta/classes/native.bbclass +3 -1
index 71b0572..bcbcd61 100644
@@ -142,6 +142,8 @@ python native_virtclass_handler () {
                 newdeps.append(dep)
         d.setVar(varname, " ".join(newdeps))
 
+    e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native")
+
     map_dependencies("DEPENDS", e.data)
     for pkg in [e.data.getVar("PN", True), "", "${PN}"]:
         map_dependencies("RDEPENDS", e.data, pkg)
@@ -161,7 +163,7 @@ python native_virtclass_handler () {
             nprovides.append(prov)
     e.data.setVar("PROVIDES", ' '.join(nprovides))
 
-    e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native")
+
 }
 
 addhandler native_virtclass_handler