summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-rw-r--r--meta/lib/oe/sstatesig.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 3a8778eae0..49afed6105 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -1,4 +1,5 @@
1import bb.siggen 1import bb.siggen
2import oe
2 3
3def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache): 4def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
4 # Return True if we should keep the dependency, False to drop it 5 # Return True if we should keep the dependency, False to drop it
@@ -368,3 +369,37 @@ def sstate_get_manifest_filename(task, d):
368 if extrainf: 369 if extrainf:
369 d2.setVar("SSTATE_MANMACH", extrainf) 370 d2.setVar("SSTATE_MANMACH", extrainf)
370 return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2) 371 return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
372
373def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
374 d2 = d
375 variant = ''
376 if taskdata2.startswith("virtual:multilib"):
377 variant = taskdata2.split(":")[2]
378 if variant not in multilibcache:
379 multilibcache[variant] = oe.utils.get_multilib_datastore(variant, d)
380 d2 = multilibcache[variant]
381
382 if taskdata.endswith("-native"):
383 pkgarchs = ["${BUILD_ARCH}"]
384 elif taskdata.startswith("nativesdk-"):
385 pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
386 elif "-cross-canadian" in taskdata:
387 pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"]
388 elif "-cross-" in taskdata:
389 pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"]
390 elif "-crosssdk" in taskdata:
391 pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"]
392 else:
393 pkgarchs = ['${MACHINE_ARCH}']
394 pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split()))
395 pkgarchs.append('allarch')
396 pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}')
397
398 for pkgarch in pkgarchs:
399 manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, taskdata, taskname))
400 if os.path.exists(manifest):
401 return manifest, d2
402 bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant))
403 return None, d2
404
405