[bitbake-devel,1/2] bb: siggen: Add a prefix for uuid4

Submitted by Robert Yang on Jan. 16, 2019, 6:30 a.m. | Patch ID: 157976

Details

Message ID 52961ec262083777d20e7711fb5b1f2b9d3196ee.1547620210.git.liezhi.yang@windriver.com
State New
Headers show

Commit Message

Robert Yang Jan. 16, 2019, 6:30 a.m.
This can make bitbake-diffsigs and dumpsig easier to understand, otherwise,
it's hard to know it is a random uuid unless look into the code.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/build.py  | 2 +-
 bitbake/lib/bb/siggen.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 3e2a94e..b8f5cd6 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -767,7 +767,7 @@  def write_taint(task, d, file_name = None):
     # The specific content of the taint file is not really important,
     # we just need it to be random, so a random UUID is used
     with open(taintfn, 'w') as taintf:
-        taintf.write(str(uuid.uuid4()))
+        taintf.write('uuid4-%s' % str(uuid.uuid4()))
 
 def stampfile(taskname, d, file_name = None, noextra=False):
     """
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 66aea79..a0ca7e1 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -206,7 +206,7 @@  class SignatureGeneratorBasic(SignatureGenerator):
         if 'nostamp' in taskdep and task in taskdep['nostamp']:
             # Nostamp tasks need an implicit taint so that they force any dependent tasks to run
             import uuid
-            taint = str(uuid.uuid4())
+            taint = 'uuid4-%s' % str(uuid.uuid4())
             data = data + taint
             self.taints[k] = "nostamp:" + taint