diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-14 10:32:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-15 12:05:52 +0100 |
commit | e8867b97a772f8e64fe209436c15d382b2175ca0 (patch) | |
tree | b207fed72d9ba42e68065e279cdf68238f590861 /meta/classes/sstate.bbclass | |
parent | 55b4f7fd217f0c65d457c731150340c18fb3fa19 (diff) | |
download | openembedded-core-e8867b97a772f8e64fe209436c15d382b2175ca0.tar.gz openembedded-core-e8867b97a772f8e64fe209436c15d382b2175ca0.tar.bz2 openembedded-core-e8867b97a772f8e64fe209436c15d382b2175ca0.zip |
sstate: Improve HASHCHECK function to make siginfo configurable
In some cases we want to test the availability of siginfo files, in some
cases we do not and really want the .tgz files (which may or may
not be present too). This makes adds a parameter to the function to allow
this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index a710305086..d5a0b04d77 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -659,10 +659,13 @@ sstate_unpack_package () { BB_HASHCHECK_FUNCTION = "sstate_checkhashes" -def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): +def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False): ret = [] missed = [] + extension = ".tgz" + if siginfo: + extension = extension + ".siginfo" def getpathcomponents(task, d): # Magic data from BB_HASHFILENAME @@ -683,7 +686,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): spec, extrapath, tname = getpathcomponents(task, d) - sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz.siginfo") + sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + extension) if os.path.exists(sstatefile): bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) @@ -718,7 +721,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): spec, extrapath, tname = getpathcomponents(task, d) - sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz.siginfo") + sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + extension) srcuri = "file://" + sstatefile localdata.setVar('SRC_URI', srcuri) |