]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
siggen: Ensure tainted stamps are accounted for with writing custom stamps
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 3 Apr 2016 14:48:30 +0000 (15:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 3 Apr 2016 14:50:12 +0000 (15:50 +0100)
sstate.bbclass for example writes siginfo files to a separate location
but we need to read taint data from the standard path.

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

index 1fa7b09272c62d8d368d63665049c970dbb0fd14..88fc0f1d5ca2078d6dc9771ebbf293379e15efe3 100644 (file)
@@ -238,9 +238,12 @@ class SignatureGeneratorBasic(SignatureGenerator):
             bb.fetch2.fetcher_parse_done()
 
     def dump_sigtask(self, fn, task, stampbase, runtime):
+
         k = fn + "." + task
-        if runtime == "customfile":
+        referencestamp = stampbase
+        if isinstance(runtime, str) and runtime.startswith("customfile"):
             sigfile = stampbase
+            referencestamp = runtime[11:]
         elif runtime and k in self.taskhash:
             sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k]
         else:
@@ -271,7 +274,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
                 data['runtaskhashes'][dep] = self.taskhash[dep]
             data['taskhash'] = self.taskhash[k]
 
-        taint = self.read_taint(fn, task, stampbase)
+        taint = self.read_taint(fn, task, referencestamp)
         if taint:
             data['taint'] = taint
 
@@ -341,7 +344,8 @@ def dump_this_task(outfile, d):
     import bb.parse
     fn = d.getVar("BB_FILENAME", True)
     task = "do_" + d.getVar("BB_CURRENTTASK", True)
-    bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
+    referencestamp = bb.build.stamp_internal(task, d, None, True)
+    bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + referencestamp)
 
 def clean_basepath(a):
     b = a.rsplit("/", 2)[1] + a.rsplit("/", 2)[2]