diff options
Diffstat (limited to 'meta/classes/native.bbclass')
-rw-r--r-- | meta/classes/native.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index ba8b0bf25e..5f25bdd2c2 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass | |||
@@ -98,18 +98,18 @@ python native_virtclass_handler () { | |||
98 | if not isinstance(e, bb.event.RecipePreFinalise): | 98 | if not isinstance(e, bb.event.RecipePreFinalise): |
99 | return | 99 | return |
100 | 100 | ||
101 | classextend = bb.data.getVar('BBCLASSEXTEND', e.data, True) or "" | 101 | classextend = e.data.getVar('BBCLASSEXTEND', True) or "" |
102 | if "native" not in classextend: | 102 | if "native" not in classextend: |
103 | return | 103 | return |
104 | 104 | ||
105 | pn = bb.data.getVar("PN", e.data, True) | 105 | pn = e.data.getVar("PN", True) |
106 | if not pn.endswith("-native"): | 106 | if not pn.endswith("-native"): |
107 | return | 107 | return |
108 | 108 | ||
109 | def map_dependencies(varname, d, suffix = ""): | 109 | def map_dependencies(varname, d, suffix = ""): |
110 | if suffix: | 110 | if suffix: |
111 | varname = varname + "_" + suffix | 111 | varname = varname + "_" + suffix |
112 | deps = bb.data.getVar(varname, d, True) | 112 | deps = d.getVar(varname, True) |
113 | if not deps: | 113 | if not deps: |
114 | return | 114 | return |
115 | deps = bb.utils.explode_deps(deps) | 115 | deps = bb.utils.explode_deps(deps) |
@@ -131,15 +131,15 @@ python native_virtclass_handler () { | |||
131 | map_dependencies("RPROVIDES", e.data, pkg) | 131 | map_dependencies("RPROVIDES", e.data, pkg) |
132 | map_dependencies("RREPLACES", e.data, pkg) | 132 | map_dependencies("RREPLACES", e.data, pkg) |
133 | 133 | ||
134 | provides = bb.data.getVar("PROVIDES", e.data, True) | 134 | provides = e.data.getVar("PROVIDES", True) |
135 | for prov in provides.split(): | 135 | for prov in provides.split(): |
136 | if prov.find(pn) != -1: | 136 | if prov.find(pn) != -1: |
137 | continue | 137 | continue |
138 | if not prov.endswith("-native"): | 138 | if not prov.endswith("-native"): |
139 | provides = provides.replace(prov, prov + "-native") | 139 | provides = provides.replace(prov, prov + "-native") |
140 | bb.data.setVar("PROVIDES", provides, e.data) | 140 | e.data.setVar("PROVIDES", provides) |
141 | 141 | ||
142 | bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-native", e.data) | 142 | bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native", e.data) |
143 | } | 143 | } |
144 | 144 | ||
145 | addhandler native_virtclass_handler | 145 | addhandler native_virtclass_handler |