summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py94
1 files changed, 0 insertions, 94 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 60ef5ea976..e1e8ff0417 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -781,100 +781,6 @@ class RunQueue:
781 781
782 self.rqexe = None 782 self.rqexe = None
783 783
784 def check_stamps(self):
785 unchecked = {}
786 current = []
787 notcurrent = []
788 buildable = []
789
790 if self.stamppolicy == "perfile":
791 fulldeptree = False
792 else:
793 fulldeptree = True
794 stampwhitelist = []
795 if self.stamppolicy == "whitelist":
796 stampwhitelist = self.rqdata.stampfnwhitelist
797
798 for task in xrange(len(self.rqdata.runq_fnid)):
799 unchecked[task] = ""
800 if len(self.rqdata.runq_depends[task]) == 0:
801 buildable.append(task)
802
803 def check_buildable(self, task, buildable):
804 for revdep in self.rqdata.runq_revdeps[task]:
805 alldeps = 1
806 for dep in self.rqdata.runq_depends[revdep]:
807 if dep in unchecked:
808 alldeps = 0
809 if alldeps == 1:
810 if revdep in unchecked:
811 buildable.append(revdep)
812
813 for task in xrange(len(self.rqdata.runq_fnid)):
814 if task not in unchecked:
815 continue
816 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
817 taskname = self.rqdata.runq_task[task]
818 stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn)
819 # If the stamp is missing its not current
820 if not os.access(stampfile, os.F_OK):
821 del unchecked[task]
822 notcurrent.append(task)
823 check_buildable(self, task, buildable)
824 continue
825 # If its a 'nostamp' task, it's not current
826 taskdep = self.rqdata.dataCache.task_deps[fn]
827 if 'nostamp' in taskdep and task in taskdep['nostamp']:
828 del unchecked[task]
829 notcurrent.append(task)
830 check_buildable(self, task, buildable)
831 continue
832
833 while (len(buildable) > 0):
834 nextbuildable = []
835 for task in buildable:
836 if task in unchecked:
837 fn = self.taskData.fn_index[self.rqdata.runq_fnid[task]]
838 taskname = self.rqdata.runq_task[task]
839 stampfile = bb.build.stampfile(taskname, self.rqdata.dataCache, fn)
840 iscurrent = True
841
842 t1 = os.stat(stampfile)[stat.ST_MTIME]
843 for dep in self.rqdata.runq_depends[task]:
844 if iscurrent:
845 fn2 = self.taskData.fn_index[self.rqdata.runq_fnid[dep]]
846 taskname2 = self.rqdata.runq_task[dep]
847 stampfile2 = bb.build.stampfile(taskname2, self.rqdata.dataCache, fn2)
848 if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
849 if dep in notcurrent:
850 iscurrent = False
851 else:
852 t2 = os.stat(stampfile2)[stat.ST_MTIME]
853 if t1 < t2:
854 iscurrent = False
855 del unchecked[task]
856 if iscurrent:
857 current.append(task)
858 else:
859 notcurrent.append(task)
860
861 check_buildable(self, task, nextbuildable)
862
863 buildable = nextbuildable
864
865 #for task in range(len(self.runq_fnid)):
866 # fn = self.taskData.fn_index[self.runq_fnid[task]]
867 # taskname = self.runq_task[task]
868 # print "%s %s.%s" % (task, taskname, fn)
869
870 #print "Unchecked: %s" % unchecked
871 #print "Current: %s" % current
872 #print "Not current: %s" % notcurrent
873
874 if len(unchecked) > 0:
875 bb.msg.fatal("RunQueue", "check_stamps fatal internal error")
876 return current
877
878 def check_stamp_task(self, task, taskname = None, recurse = False, cache = None): 784 def check_stamp_task(self, task, taskname = None, recurse = False, cache = None):
879 def get_timestamp(f): 785 def get_timestamp(f):
880 try: 786 try: