diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 12 | ||||
-rw-r--r-- | bitbake/lib/bb/cache.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 12 | ||||
-rw-r--r-- | bitbake/lib/bb/siggen.py | 8 |
4 files changed, 29 insertions, 14 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 722639f3bb..e723c7ea85 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -386,14 +386,16 @@ def stamp_internal(taskname, d, file_name): """ if file_name: stamp = d.stamp[file_name] + extrainfo = d.stamp_extrainfo[file_name].get(taskname) or "" else: stamp = d.getVar('STAMP', True) file_name = d.getVar('BB_FILENAME', True) + extrainfo = d.getVarFlag(taskname, 'stamp-extra-info', True) or "" if not stamp: return - stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname) + stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname, extrainfo) bb.utils.mkdirhier(os.path.dirname(stamp)) @@ -420,8 +422,12 @@ def del_stamp(task, d, file_name = None): stamp = stamp_internal(task, d, file_name) bb.utils.remove(stamp) -def stampfile(taskname, d): - return stamp_internal(taskname, d, None) +def stampfile(taskname, d, file_name = None): + """ + Return the stamp for a given task + (d can be a data dict or dataCache) + """ + return stamp_internal(taskname, d, file_name) def add_tasks(tasklist, d): task_deps = data.getVar('_task_deps', d) diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 9a2e2d5298..262f574f51 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -43,7 +43,7 @@ except ImportError: logger.info("Importing cPickle failed. " "Falling back to a very slow implementation.") -__cache_version__ = "134" +__cache_version__ = "135" recipe_fields = ( 'pn', @@ -55,6 +55,7 @@ recipe_fields = ( 'provides', 'task_deps', 'stamp', + 'stamp_extrainfo', 'broken', 'not_world', 'skipped', @@ -102,6 +103,11 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)): for task in tasks) @classmethod + def flaglist(cls, flag, varlist, metadata): + return dict((var, metadata.getVarFlag(flag, var, True)) + for var in varlist) + + @classmethod def getvar(cls, var, metadata): return metadata.getVar(var, True) or '' @@ -148,6 +154,7 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)): broken = cls.getvar('BROKEN', metadata), not_world = cls.getvar('EXCLUDE_FROM_WORLD', metadata), stamp = cls.getvar('STAMP', metadata), + stamp_extrainfo = cls.flaglist('stamp-extra-info', tasks, metadata), packages_dynamic = cls.listvar('PACKAGES_DYNAMIC', metadata), depends = cls.depvar('DEPENDS', metadata), provides = cls.depvar('PROVIDES', metadata), @@ -562,6 +569,7 @@ class CacheData(object): self.task_queues = {} self.task_deps = {} self.stamp = {} + self.stamp_extrainfo = {} self.preferred = {} self.tasks = {} self.basetaskhash = {} @@ -583,6 +591,7 @@ class CacheData(object): self.pkg_pepvpr[fn] = (info.pe, info.pv, info.pr) self.pkg_dp[fn] = info.defaultpref self.stamp[fn] = info.stamp + self.stamp_extrainfo[fn] = info.stamp_extrainfo provides = [info.pn] for provide in info.provides: diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index a46527505f..b9d89ec082 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -794,7 +794,7 @@ class RunQueue: continue fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] taskname = self.rqdata.runq_task[task] - stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], fn, taskname) + stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) # If the stamp is missing its not current if not os.access(stampfile, os.F_OK): del unchecked[task] @@ -815,7 +815,7 @@ class RunQueue: if task in unchecked: fn = self.taskData.fn_index[self.rqdata.runq_fnid[task]] taskname = self.rqdata.runq_task[task] - stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], fn, taskname) + stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) iscurrent = True t1 = os.stat(stampfile)[stat.ST_MTIME] @@ -823,7 +823,7 @@ class RunQueue: if iscurrent: fn2 = self.taskData.fn_index[self.rqdata.runq_fnid[dep]] taskname2 = self.rqdata.runq_task[dep] - stampfile2 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], fn2, taskname2) + stampfile2 = bb.build.stampfile(taskname2, self.rqdata.dataCache, fn2) if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist): if dep in notcurrent: iscurrent = False @@ -875,7 +875,7 @@ class RunQueue: if taskname is None: taskname = self.rqdata.runq_task[task] - stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], fn, taskname) + stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) # If the stamp is missing its not current if not os.access(stampfile, os.F_OK): @@ -896,8 +896,8 @@ class RunQueue: if iscurrent: fn2 = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[dep]] taskname2 = self.rqdata.runq_task[dep] - stampfile2 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], fn2, taskname2) - stampfile3 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], fn2, taskname2 + "_setscene") + stampfile2 = bb.build.stampfile(taskname2, self.rqdata.dataCache, fn2) + stampfile3 = bb.build.stampfile(taskname2 + "_setscene", self.rqdata.dataCache, fn2) t2 = get_timestamp(stampfile2) t3 = get_timestamp(stampfile3) if t3 and t3 > t2: diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 010c2cab26..2d28ecfc2d 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py @@ -42,8 +42,8 @@ class SignatureGenerator(object): def set_taskdata(self, hashes, deps): return - def stampfile(self, stampbase, file_name, taskname): - return "%s.%s" % (stampbase, taskname) + def stampfile(self, stampbase, file_name, taskname, extrainfo): + return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.') class SignatureGeneratorBasic(SignatureGenerator): """ @@ -196,13 +196,13 @@ class SignatureGeneratorBasic(SignatureGenerator): class SignatureGeneratorBasicHash(SignatureGeneratorBasic): name = "basichash" - def stampfile(self, stampbase, fn, taskname): + def stampfile(self, stampbase, fn, taskname, extrainfo): if taskname != "do_setscene" and taskname.endswith("_setscene"): k = fn + "." + taskname[:-9] else: k = fn + "." + taskname h = self.taskhash[k] - return "%s.%s.%s" % (stampbase, taskname, h) + return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.') def dump_this_task(outfile, d): fn = d.getVar("BB_FILENAME", True) |