classes/sstate: break out function to get sstate manifest filename
It is useful in a few different contexts to see which files have been written out by an sstate task; break out a function that lets us get the path to the manifest file easily. (From OE-Core rev: 090196dd2d8f4306b34b239e78c39d37cc86034c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2a05181d98
commit
3a9e230b7a
|
@ -157,17 +157,14 @@ def sstate_add(ss, source, dest, d):
|
|||
|
||||
def sstate_install(ss, d):
|
||||
import oe.path
|
||||
import oe.sstatesig
|
||||
import subprocess
|
||||
|
||||
sharedfiles = []
|
||||
shareddirs = []
|
||||
bb.utils.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
|
||||
|
||||
d2 = d.createCopy()
|
||||
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
|
||||
if extrainf:
|
||||
d2.setVar("SSTATE_MANMACH", extrainf)
|
||||
manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['task'])
|
||||
manifest, d2 = oe.sstatesig.sstate_get_manifest_filename(ss['task'], d)
|
||||
|
||||
if os.access(manifest, os.R_OK):
|
||||
bb.fatal("Package already staged (%s)?!" % manifest)
|
||||
|
|
|
@ -277,3 +277,15 @@ def find_siginfo(pn, taskname, taskhashlist, d):
|
|||
return filedates
|
||||
|
||||
bb.siggen.find_siginfo = find_siginfo
|
||||
|
||||
|
||||
def sstate_get_manifest_filename(task, d):
|
||||
"""
|
||||
Return the sstate manifest file path for a particular task.
|
||||
Also returns the datastore that can be used to query related variables.
|
||||
"""
|
||||
d2 = d.createCopy()
|
||||
extrainf = d.getVarFlag("do_" + task, 'stamp-extra-info', True)
|
||||
if extrainf:
|
||||
d2.setVar("SSTATE_MANMACH", extrainf)
|
||||
return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)
|
||||
|
|
Loading…
Reference in New Issue