summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-27 17:22:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-01 22:13:55 +0000
commit3eff72cc1f5989144f8d2cc93fab69e4d3d80f8c (patch)
treef6a23e388a034f9836b1852eb5cf1f39dfdc6fca /meta/lib/oe/sstatesig.py
parent6a07697a6dcb5e77aed4b01df4b30024c4b3d0fe (diff)
downloadpoky-3eff72cc1f5989144f8d2cc93fab69e4d3d80f8c.tar.gz
sstatesig/staging/package_manager: Create common sstate manifest code
Create a common function for locating task manifest files rather than several implementations with missing pieces. (From OE-Core rev: 68150bac7444f089f19c789e9f6602d59f605d7a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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