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

Robert Yang liezhi.yang at windriver.com
Wed Jan 16 06:30:41 UTC 2019


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 at windriver.com>
---
 bitbake/lib/bb/build.py  | 2 +-
 bitbake/lib/bb/siggen.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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
 
-- 
2.7.4



More information about the bitbake-devel mailing list