summaryrefslogtreecommitdiffstats
path: root/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-10 09:22:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-11 10:04:48 +0100
commit728ffde1bd69b880d48fe8523b1616956d13616e (patch)
tree408b59c485d314cb85f796eeb72f6df76b572635 /lib/bb/runqueue.py
parente95755c4931b26d9f8102ed3652dff969145cfc9 (diff)
downloadbitbake-728ffde1bd69b880d48fe8523b1616956d13616e.tar.gz
bitbake/runqueue: Drop check_stamps function, it is obsolete and unused
This was originally used to check the consistency of the stamps in one function call. This turns out to be inefficient, unnecessary and if it were necessary, check_stamp_task() could be called in a loop. The function has been unmodified for a while and likely contains bugs. Its best simply removed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r--lib/bb/runqueue.py94
1 files changed, 0 insertions, 94 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 60ef5ea97..e1e8ff041 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -781,100 +781,6 @@ class RunQueue:
self.rqexe = None
- def check_stamps(self):
- unchecked = {}
- current = []
- notcurrent = []
- buildable = []
-
- if self.stamppolicy == "perfile":
- fulldeptree = False
- else:
- fulldeptree = True
- stampwhitelist = []
- if self.stamppolicy == "whitelist":
- stampwhitelist = self.rqdata.stampfnwhitelist
-
- for task in xrange(len(self.rqdata.runq_fnid)):
- unchecked[task] = ""
- if len(self.rqdata.runq_depends[task]) == 0:
- buildable.append(task)
-
- def check_buildable(self, task, buildable):
- for revdep in self.rqdata.runq_revdeps[task]:
- alldeps = 1
- for dep in self.rqdata.runq_depends[revdep]:
- if dep in unchecked:
- alldeps = 0
- if alldeps == 1:
- if revdep in unchecked:
- buildable.append(revdep)
-
- for task in xrange(len(self.rqdata.runq_fnid)):
- if task not in unchecked:
- continue
- fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
- taskname = self.rqdata.runq_task[task]
- 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]
- notcurrent.append(task)
- check_buildable(self, task, buildable)
- continue
- # If its a 'nostamp' task, it's not current
- taskdep = self.rqdata.dataCache.task_deps[fn]
- if 'nostamp' in taskdep and task in taskdep['nostamp']:
- del unchecked[task]
- notcurrent.append(task)
- check_buildable(self, task, buildable)
- continue
-
- while (len(buildable) > 0):
- nextbuildable = []
- for task in buildable:
- if task in unchecked:
- fn = self.taskData.fn_index[self.rqdata.runq_fnid[task]]
- taskname = self.rqdata.runq_task[task]
- stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn)
- iscurrent = True
-
- t1 = os.stat(stampfile)[stat.ST_MTIME]
- for dep in self.rqdata.runq_depends[task]:
- if iscurrent:
- fn2 = self.taskData.fn_index[self.rqdata.runq_fnid[dep]]
- taskname2 = self.rqdata.runq_task[dep]
- 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
- else:
- t2 = os.stat(stampfile2)[stat.ST_MTIME]
- if t1 < t2:
- iscurrent = False
- del unchecked[task]
- if iscurrent:
- current.append(task)
- else:
- notcurrent.append(task)
-
- check_buildable(self, task, nextbuildable)
-
- buildable = nextbuildable
-
- #for task in range(len(self.runq_fnid)):
- # fn = self.taskData.fn_index[self.runq_fnid[task]]
- # taskname = self.runq_task[task]
- # print "%s %s.%s" % (task, taskname, fn)
-
- #print "Unchecked: %s" % unchecked
- #print "Current: %s" % current
- #print "Not current: %s" % notcurrent
-
- if len(unchecked) > 0:
- bb.msg.fatal("RunQueue", "check_stamps fatal internal error")
- return current
-
def check_stamp_task(self, task, taskname = None, recurse = False, cache = None):
def get_timestamp(f):
try: