summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-09 13:29:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-11 12:27:22 +0100
commitbc19e915fbbb932f7ad7bb8a0b7fb3227f94562f (patch)
treea2618b4c0fb8e46bce86dc2eb84cc7642a625327
parentfe0219ccc8c2a9e61be9ac5231fcae7b9d29ce5e (diff)
downloadpoky-bc19e915fbbb932f7ad7bb8a0b7fb3227f94562f.tar.gz
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>
-rw-r--r--meta/classes/base.bbclass6
-rw-r--r--meta/classes/native.bbclass2
-rw-r--r--meta/classes/sstate.bbclass4
-rw-r--r--meta/lib/oe/classextend.py8
-rw-r--r--meta/lib/oe/sstatesig.py4
5 files changed, 12 insertions, 12 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 8a74d6e578..c0d2c8ec88 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -182,7 +182,7 @@ def preferred_ml_updates(d):
182 for prov in providers: 182 for prov in providers:
183 val = d.getVar(prov, False) 183 val = d.getVar(prov, False)
184 pkg = prov.replace("PREFERRED_PROVIDER_", "") 184 pkg = prov.replace("PREFERRED_PROVIDER_", "")
185 if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")): 185 if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
186 continue 186 continue
187 if 'cross-canadian' in pkg: 187 if 'cross-canadian' in pkg:
188 for p in prefixes: 188 for p in prefixes:
@@ -229,7 +229,7 @@ def preferred_ml_updates(d):
229 mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split() 229 mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
230 extramp = [] 230 extramp = []
231 for p in mp: 231 for p in mp:
232 if p.endswith(("-native", "-crosssdk")) or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p: 232 if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p:
233 continue 233 continue
234 virt = "" 234 virt = ""
235 if p.startswith("virtual/"): 235 if p.startswith("virtual/"):
@@ -413,7 +413,7 @@ python () {
413 appends = bb.utils.explode_deps(d.expand(" ".join(appends))) 413 appends = bb.utils.explode_deps(d.expand(" ".join(appends)))
414 newappends = [] 414 newappends = []
415 for a in appends: 415 for a in appends:
416 if a.endswith("-native") or a.endswith("-cross"): 416 if a.endswith("-native") or ("-cross-" in a):
417 newappends.append(a) 417 newappends.append(a)
418 elif a.startswith("virtual/"): 418 elif a.startswith("virtual/"):
419 subs = a.split("/", 1)[1] 419 subs = a.split("/", 1)[1]
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 2d182f0ebc..31f1c41ac6 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -125,7 +125,7 @@ python native_virtclass_handler () {
125 deps = bb.utils.explode_deps(deps) 125 deps = bb.utils.explode_deps(deps)
126 newdeps = [] 126 newdeps = []
127 for dep in deps: 127 for dep in deps:
128 if dep.endswith("-cross"): 128 if "-cross-" in dep:
129 newdeps.append(dep.replace("-cross", "-native")) 129 newdeps.append(dep.replace("-cross", "-native"))
130 elif not dep.endswith("-native"): 130 elif not dep.endswith("-native"):
131 newdeps.append(dep + "-native") 131 newdeps.append(dep + "-native")
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 46cc2677d6..796c1a9f60 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -715,7 +715,7 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
715 bb.debug(2, "Considering setscene task: %s" % (str(taskdependees[task]))) 715 bb.debug(2, "Considering setscene task: %s" % (str(taskdependees[task])))
716 716
717 def isNativeCross(x): 717 def isNativeCross(x):
718 return x.endswith("-native") or x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-crosssdk") or x.endswith("-crosssdk-initial") 718 return x.endswith("-native") or "-cross-" in x or "-crosssdk" in x
719 719
720 def isPostInstDep(x): 720 def isPostInstDep(x):
721 if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-update-icon-cache-native"]: 721 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):
750 if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")): 750 if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")):
751 continue 751 continue
752 # Nothing need depend on libc-initial/gcc-cross-initial 752 # Nothing need depend on libc-initial/gcc-cross-initial
753 if taskdependees[task][0].endswith("-initial"): 753 if "-initial" in taskdependees[task][0]:
754 continue 754 continue
755 # Native/Cross populate_sysroot need their dependencies 755 # Native/Cross populate_sysroot need their dependencies
756 if isNativeCross(taskdependees[task][0]) and isNativeCross(taskdependees[dep][0]): 756 if isNativeCross(taskdependees[task][0]) and isNativeCross(taskdependees[dep][0]):
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index e2ae7e9f94..14d6f20a88 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -52,7 +52,7 @@ class ClassExtender(object):
52 return newdata 52 return newdata
53 53
54 def map_depends(self, dep): 54 def map_depends(self, dep):
55 if dep.endswith(("-native", "-native-runtime", "-crosssdk")) or ('nativesdk-' in dep) or ('cross-canadian' in dep): 55 if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep):
56 return dep 56 return dep
57 else: 57 else:
58 return self.extend_name(dep) 58 return self.extend_name(dep)
@@ -96,9 +96,9 @@ class ClassExtender(object):
96 96
97class NativesdkClassExtender(ClassExtender): 97class NativesdkClassExtender(ClassExtender):
98 def map_depends(self, dep): 98 def map_depends(self, dep):
99 if dep.endswith(("-native", "-native-runtime", "-cross", "-crosssdk")) or ('nativesdk-' in dep): 99 if dep.endswith(("-gcc-initial", "-gcc", "-g++")):
100 return dep
101 elif dep.endswith(("-gcc-intermediate", "-gcc-initial", "-gcc", "-g++")):
102 return dep + "-crosssdk" 100 return dep + "-crosssdk"
101 elif dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('-cross-' in dep) or ('-crosssdk-' in dep):
102 return dep
103 else: 103 else:
104 return self.extend_name(dep) 104 return self.extend_name(dep)
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index aa25c3a10e..40f99744fb 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -5,7 +5,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
5 def isNative(x): 5 def isNative(x):
6 return x.endswith("-native") 6 return x.endswith("-native")
7 def isCross(x): 7 def isCross(x):
8 return x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-cross-intermediate") 8 return "-cross-" in x
9 def isNativeSDK(x): 9 def isNativeSDK(x):
10 return x.startswith("nativesdk-") 10 return x.startswith("nativesdk-")
11 def isKernel(fn): 11 def isKernel(fn):
@@ -139,7 +139,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
139 localdata.setVar('PV', '*') 139 localdata.setVar('PV', '*')
140 localdata.setVar('PR', '*') 140 localdata.setVar('PR', '*')
141 localdata.setVar('BB_TASKHASH', hashval) 141 localdata.setVar('BB_TASKHASH', hashval)
142 if pn.endswith('-native') or pn.endswith('-crosssdk') or pn.endswith('-cross'): 142 if pn.endswith('-native') or "-cross-" in pn or "-crosssdk-" in pn:
143 localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/") 143 localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
144 sstatename = taskname[3:] 144 sstatename = taskname[3:]
145 filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG', True), sstatename) 145 filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG', True), sstatename)