summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-14 10:32:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-15 17:44:59 +0100
commit1237db6ee335f5b4cbdad98da3fff5284afb603b (patch)
tree220836277ae793e4d2c6205acf80d49385faf94d /meta/classes/sstate.bbclass
parentf5f2467e4bdd1a3fda9b443712d32502645ebe3e (diff)
downloadpoky-1237db6ee335f5b4cbdad98da3fff5284afb603b.tar.gz
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. (From OE-Core rev: e8867b97a772f8e64fe209436c15d382b2175ca0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass9
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 () {
659 659
660BB_HASHCHECK_FUNCTION = "sstate_checkhashes" 660BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
661 661
662def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): 662def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
663 663
664 ret = [] 664 ret = []
665 missed = [] 665 missed = []
666 extension = ".tgz"
667 if siginfo:
668 extension = extension + ".siginfo"
666 669
667 def getpathcomponents(task, d): 670 def getpathcomponents(task, d):
668 # Magic data from BB_HASHFILENAME 671 # Magic data from BB_HASHFILENAME
@@ -683,7 +686,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
683 686
684 spec, extrapath, tname = getpathcomponents(task, d) 687 spec, extrapath, tname = getpathcomponents(task, d)
685 688
686 sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz.siginfo") 689 sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + extension)
687 690
688 if os.path.exists(sstatefile): 691 if os.path.exists(sstatefile):
689 bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) 692 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):
718 721
719 spec, extrapath, tname = getpathcomponents(task, d) 722 spec, extrapath, tname = getpathcomponents(task, d)
720 723
721 sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz.siginfo") 724 sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + extension)
722 725
723 srcuri = "file://" + sstatefile 726 srcuri = "file://" + sstatefile
724 localdata.setVar('SRC_URI', srcuri) 727 localdata.setVar('SRC_URI', srcuri)