1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

classes/lib/oe: Fix cross/crosssdk references

With the renaming of the cross packages, its no longer possible to use
endswith("-cross") and similar to detect cross packages. Replace these
references with other techniques.

This resolves certain build from sstate failures which were due to the
system believing cross packages were target packages and therefore
dependency handling was altered.

(From OE-Core rev: 91edf4cac223298e50a4b8e59dd19f1b272e3418)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2014-05-09 13:29:13 +01:00
parent fe0219ccc8
commit bc19e915fb
5 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -182,7 +182,7 @@ def preferred_ml_updates(d):
for prov in providers: for prov in providers:
val = d.getVar(prov, False) val = d.getVar(prov, False)
pkg = prov.replace("PREFERRED_PROVIDER_", "") pkg = prov.replace("PREFERRED_PROVIDER_", "")
if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")): if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
continue continue
if 'cross-canadian' in pkg: if 'cross-canadian' in pkg:
for p in prefixes: for p in prefixes:
@@ -229,7 +229,7 @@ def preferred_ml_updates(d):
mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split() mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
extramp = [] extramp = []
for p in mp: for p in mp:
if p.endswith(("-native", "-crosssdk")) or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p: if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p:
continue continue
virt = "" virt = ""
if p.startswith("virtual/"): if p.startswith("virtual/"):
@@ -413,7 +413,7 @@ python () {
appends = bb.utils.explode_deps(d.expand(" ".join(appends))) appends = bb.utils.explode_deps(d.expand(" ".join(appends)))
newappends = [] newappends = []
for a in appends: for a in appends:
if a.endswith("-native") or a.endswith("-cross"): if a.endswith("-native") or ("-cross-" in a):
newappends.append(a) newappends.append(a)
elif a.startswith("virtual/"): elif a.startswith("virtual/"):
subs = a.split("/", 1)[1] subs = a.split("/", 1)[1]
+1 -1
View File
@@ -125,7 +125,7 @@ python native_virtclass_handler () {
deps = bb.utils.explode_deps(deps) deps = bb.utils.explode_deps(deps)
newdeps = [] newdeps = []
for dep in deps: for dep in deps:
if dep.endswith("-cross"): if "-cross-" in dep:
newdeps.append(dep.replace("-cross", "-native")) newdeps.append(dep.replace("-cross", "-native"))
elif not dep.endswith("-native"): elif not dep.endswith("-native"):
newdeps.append(dep + "-native") newdeps.append(dep + "-native")
+2 -2
View File
@@ -715,7 +715,7 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
bb.debug(2, "Considering setscene task: %s" % (str(taskdependees[task]))) bb.debug(2, "Considering setscene task: %s" % (str(taskdependees[task])))
def isNativeCross(x): def isNativeCross(x):
return x.endswith("-native") or x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-crosssdk") or x.endswith("-crosssdk-initial") return x.endswith("-native") or "-cross-" in x or "-crosssdk" in x
def isPostInstDep(x): def isPostInstDep(x):
if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-update-icon-cache-native"]: if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-update-icon-cache-native"]:
@@ -750,7 +750,7 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")): if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")):
continue continue
# Nothing need depend on libc-initial/gcc-cross-initial # Nothing need depend on libc-initial/gcc-cross-initial
if taskdependees[task][0].endswith("-initial"): if "-initial" in taskdependees[task][0]:
continue continue
# Native/Cross populate_sysroot need their dependencies # Native/Cross populate_sysroot need their dependencies
if isNativeCross(taskdependees[task][0]) and isNativeCross(taskdependees[dep][0]): if isNativeCross(taskdependees[task][0]) and isNativeCross(taskdependees[dep][0]):
+4 -4
View File
@@ -52,7 +52,7 @@ class ClassExtender(object):
return newdata return newdata
def map_depends(self, dep): def map_depends(self, dep):
if dep.endswith(("-native", "-native-runtime", "-crosssdk")) or ('nativesdk-' in dep) or ('cross-canadian' in dep): if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep):
return dep return dep
else: else:
return self.extend_name(dep) return self.extend_name(dep)
@@ -96,9 +96,9 @@ class ClassExtender(object):
class NativesdkClassExtender(ClassExtender): class NativesdkClassExtender(ClassExtender):
def map_depends(self, dep): def map_depends(self, dep):
if dep.endswith(("-native", "-native-runtime", "-cross", "-crosssdk")) or ('nativesdk-' in dep): if dep.endswith(("-gcc-initial", "-gcc", "-g++")):
return dep
elif dep.endswith(("-gcc-intermediate", "-gcc-initial", "-gcc", "-g++")):
return dep + "-crosssdk" return dep + "-crosssdk"
elif dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('-cross-' in dep) or ('-crosssdk-' in dep):
return dep
else: else:
return self.extend_name(dep) return self.extend_name(dep)
+2 -2
View File
@@ -5,7 +5,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
def isNative(x): def isNative(x):
return x.endswith("-native") return x.endswith("-native")
def isCross(x): def isCross(x):
return x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-cross-intermediate") return "-cross-" in x
def isNativeSDK(x): def isNativeSDK(x):
return x.startswith("nativesdk-") return x.startswith("nativesdk-")
def isKernel(fn): def isKernel(fn):
@@ -139,7 +139,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
localdata.setVar('PV', '*') localdata.setVar('PV', '*')
localdata.setVar('PR', '*') localdata.setVar('PR', '*')
localdata.setVar('BB_TASKHASH', hashval) localdata.setVar('BB_TASKHASH', hashval)
if pn.endswith('-native') or pn.endswith('-crosssdk') or pn.endswith('-cross'): if pn.endswith('-native') or "-cross-" in pn or "-crosssdk-" in pn:
localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/") localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
sstatename = taskname[3:] sstatename = taskname[3:]
filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG', True), sstatename) filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG', True), sstatename)