]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake build/siggen/runqueue: Fix stampfile parameters
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Jan 2011 19:47:00 +0000 (19:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Jan 2011 19:47:03 +0000 (19:47 +0000)
The current parameters are not useful to the stampfile generator function
as they can't uniquely define a task. This updated things so the
parameters can identify unique tasks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/build.py
bitbake/lib/bb/runqueue.py
bitbake/lib/bb/siggen.py

index 3fc01486ca90b17f1744eb6a2ffdc899cb8dd4f6..968e2ea562150515ef0aef1042b90896248f412c 100644 (file)
@@ -373,7 +373,7 @@ def exec_task(fn, task, d):
             event.fire(failedevent, d)
         return 1
 
-def stamp_internal(task, d, file_name):
+def stamp_internal(taskname, d, file_name):
     """
     Internal stamp helper function
     Makes sure the stamp directory exists
@@ -386,11 +386,12 @@ def stamp_internal(task, d, file_name):
         stamp = d.stamp[file_name]
     else:
         stamp = d.getVar('STAMP', True)
+        file_name = d.getVar('BB_FILENAME', True)
 
     if not stamp:
         return
 
-    stamp = "%s.%s" % (stamp, task)
+    stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname)
 
     bb.utils.mkdirhier(os.path.dirname(stamp))
 
index bfb16b4f6eef73ec9e05562c13ac8576223ffcc5..16420b87a482cf12b022087ac2908319540a7f85 100644 (file)
@@ -829,7 +829,7 @@ class RunQueue:
                 continue
             fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
             taskname = self.rqdata.runq_task[task]
-            stampfile = "%s.%s" % (self.rqdata.dataCache.stamp[fn], taskname)
+            stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], fn, taskname)
             # If the stamp is missing its not current
             if not os.access(stampfile, os.F_OK):
                 del unchecked[task]
@@ -850,7 +850,7 @@ class RunQueue:
                 if task in unchecked:
                     fn = self.taskData.fn_index[self.rqdata.runq_fnid[task]]
                     taskname = self.rqdata.runq_task[task]
-                    stampfile = "%s.%s" % (self.rqdata.dataCache.stamp[fn], taskname)
+                    stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], fn, taskname)
                     iscurrent = True
 
                     t1 = os.stat(stampfile)[stat.ST_MTIME]
@@ -858,7 +858,7 @@ class RunQueue:
                         if iscurrent:
                             fn2 = self.taskData.fn_index[self.rqdata.runq_fnid[dep]]
                             taskname2 = self.rqdata.runq_task[dep]
-                            stampfile2 = "%s.%s" % (self.rqdata.dataCache.stamp[fn2], taskname2)
+                            stampfile2 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], fn2, taskname2)
                             if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
                                 if dep in notcurrent:
                                     iscurrent = False
@@ -910,7 +910,7 @@ class RunQueue:
         if taskname is None:
             taskname = self.rqdata.runq_task[task]
         
-        stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], taskname, self.rqdata.runq_hash[task])
+        stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], fn, taskname)
 
         # If the stamp is missing its not current
         if not os.access(stampfile, os.F_OK):
@@ -931,8 +931,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], taskname2, self.rqdata.runq_hash[dep])
-                stampfile3 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], taskname2 + "_setscene", self.rqdata.runq_hash[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")
                 t2 = get_timestamp(stampfile2)
                 t3 = get_timestamp(stampfile3)
                 if t3 and t3 > t2:
index 94ae2b48abbd285437bce92a696ef5189360f19d..7d7a203b835d6bf67ecaff7c5a0676930caed666 100644 (file)
@@ -42,7 +42,7 @@ class SignatureGenerator(object):
     def set_taskdata(self, hashes, deps):
         return
 
-    def stampfile(self, stampbase, taskname, taskhash):
+    def stampfile(self, stampbase, file_name, taskname):
         return "%s.%s" % (stampbase, taskname)
 
 class SignatureGeneratorBasic(SignatureGenerator):