[poky] [PATCH 2/3] bitbake: Introduce stamp-extra-info into build stamp file
Dongxiao Xu
dongxiao.xu at intel.com
Sat Jan 8 07:53:04 PST 2011
For certain tasks, we need additional information in build stamp file
except the task name and file name. stamp-extra-info is introduced as
an flag adding to the end of stamp file name.
We also implement a blacklist, in which extra stamp information will
not be added.
Signed-off-by: Dongxiao Xu <dongxiao.xu at intel.com>
---
bitbake/lib/bb/siggen.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 4dc09b3..6c5a227 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -43,7 +43,17 @@ class SignatureGenerator(object):
return
def stampfile(self, stampbase, file_name, taskname):
- return "%s.%s" % (stampbase, taskname)
+ stamp_extra_info = (self.data.getVarFlag(taskname, 'stamp-extra-info', True) or self.data.getVar('BB_STAMP_EXTRA', True) or "")
+
+ if self.stampblacklist:
+ self.sbl = re.compile(self.stampblacklist)
+ else:
+ self.sbl = None
+
+ if self.sbl and self.sbl.search(file_name):
+ return "%s.%s" % (stampbase, taskname)
+
+ return ("%s.%s.%s" % (stampbase, taskname, stamp_extra_info)).rstrip('.')
class SignatureGeneratorBasic(SignatureGenerator):
"""
@@ -59,6 +69,8 @@ class SignatureGeneratorBasic(SignatureGenerator):
self.lookupcache = {}
self.basewhitelist = (data.getVar("BB_HASHBASE_WHITELIST", True) or "").split()
self.taskwhitelist = data.getVar("BB_HASHTASK_WHITELIST", True) or None
+ self.stampblacklist = data.getVar("BB_STAMPTASK_BLACKLIST", True) or None
+ self.data = data
if self.taskwhitelist:
self.twl = re.compile(self.taskwhitelist)
--
1.6.3.3
More information about the poky
mailing list