aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-05-04 23:01:39 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-05-04 23:01:39 +0000
commit814203c59006bea789034825fbd3a0cc6d1b1ee2 (patch)
tree3873a9a36421b11c17d93730cff069ee62e2b3f6
parente9bf48c6c049dc58878e53c9d0f1f8e6fb856ea0 (diff)
downloadbitbake-814203c59006bea789034825fbd3a0cc6d1b1ee2.tar.gz
runqueue.py: Add BB_STAMP_WHITELIST option which contains a list of stamps to ignore when checking stamp dependencies and using a BB_STAMP_POLICY of 'whitelist'. Useful for packaged-staging
-rw-r--r--ChangeLog2
-rw-r--r--lib/bb/runqueue.py23
2 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c30125ee8..7bea472d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,8 @@ Changes in Bitbake 1.9.x:
- Improve runfetchcmd so errors are seen and various GIT variables are exported
- Add ability to fetchers to check URL validity without downloading
- Improve runtime PREFERRED_PROVIDERS warning message
+ - Add BB_STAMP_WHITELIST option which contains a list of stamps to ignore when
+ checking stamp dependencies and using a BB_STAMP_POLICY of "whitelist"
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index e8b3bde98..6951059fc 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -168,6 +168,7 @@ class RunQueue:
self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData, 1) or "").split()
self.scheduler = bb.data.getVar("BB_SCHEDULER", cfgData, 1) or "speed"
self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, 1) or "perfile"
+ self.stampwhitelist = bb.data.getVar("BB_STAMP_WHITELIST", cfgData, 1) or []
def reset_runqueue(self):
self.runq_fnid = []
@@ -685,6 +686,18 @@ class RunQueue:
#if error:
# bb.msg.fatal(bb.msg.domain.RunQueue, "Corrupted metadata configuration detected, aborting...")
+
+ # Create a whitelist usable by the stamp checks
+ stampfnwhitelist = []
+ for entry in self.stampwhitelist.split():
+ entryid = self.taskData.getbuild_id(entry)
+ if entryid not in self.taskData.build_targets:
+ continue
+ fnid = self.taskData.build_targets[entryid][0]
+ fn = self.taskData.fn_index[fnid]
+ stampfnwhitelist.append(fn)
+ self.stampfnwhitelist = stampfnwhitelist
+
#self.dump_data(taskData)
self.state = runQueueRunInit
@@ -699,6 +712,9 @@ class RunQueue:
fulldeptree = False
else:
fulldeptree = True
+ stampwhitelist = []
+ if self.stamppolicy == "whitelist":
+ stampwhitelist = self.self.stampfnwhitelist
for task in range(len(self.runq_fnid)):
unchecked[task] = ""
@@ -750,7 +766,7 @@ class RunQueue:
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
taskname2 = self.runq_task[dep]
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
- if fulldeptree or fn == fn2:
+ if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
if dep in notcurrent:
iscurrent = False
else:
@@ -786,6 +802,9 @@ class RunQueue:
fulldeptree = False
else:
fulldeptree = True
+ stampwhitelist = []
+ if self.stamppolicy == "whitelist":
+ stampwhitelist = self.stampfnwhitelist
fn = self.taskData.fn_index[self.runq_fnid[task]]
taskname = self.runq_task[task]
@@ -805,7 +824,7 @@ class RunQueue:
fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
taskname2 = self.runq_task[dep]
stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
- if fulldeptree or fn == fn2:
+ if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
try:
t2 = os.stat(stampfile2)[stat.ST_MTIME]
if t1 < t2: