mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
bitbake: siggen: Split out stampfile hash fetch
The mechanism used to get the hash for a stamp file is split out so that it can be overridden by derived classes [YOCTO #13030] (Bitbake rev: ce241534d19b2f1c51dbdb3b92419676d234e464) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
86cc1a4104
commit
e089fb1ae0
@@ -311,6 +311,13 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
|
class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
|
||||||
name = "basichash"
|
name = "basichash"
|
||||||
|
|
||||||
|
def get_stampfile_hash(self, task):
|
||||||
|
if task in self.taskhash:
|
||||||
|
return self.taskhash[task]
|
||||||
|
|
||||||
|
# If task is not in basehash, then error
|
||||||
|
return self.basehash[task]
|
||||||
|
|
||||||
def stampfile(self, stampbase, fn, taskname, extrainfo, clean=False):
|
def stampfile(self, stampbase, fn, taskname, extrainfo, clean=False):
|
||||||
if taskname != "do_setscene" and taskname.endswith("_setscene"):
|
if taskname != "do_setscene" and taskname.endswith("_setscene"):
|
||||||
k = fn + "." + taskname[:-9]
|
k = fn + "." + taskname[:-9]
|
||||||
@@ -318,11 +325,9 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
|
|||||||
k = fn + "." + taskname
|
k = fn + "." + taskname
|
||||||
if clean:
|
if clean:
|
||||||
h = "*"
|
h = "*"
|
||||||
elif k in self.taskhash:
|
|
||||||
h = self.taskhash[k]
|
|
||||||
else:
|
else:
|
||||||
# If k is not in basehash, then error
|
h = self.get_stampfile_hash(k)
|
||||||
h = self.basehash[k]
|
|
||||||
return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.')
|
return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.')
|
||||||
|
|
||||||
def stampcleanmask(self, stampbase, fn, taskname, extrainfo):
|
def stampcleanmask(self, stampbase, fn, taskname, extrainfo):
|
||||||
|
|||||||
Reference in New Issue
Block a user