Skip to contentSkip to conversation

bb: siggen: 2 fixes

PATCH In review Robert Yang 2 participants 6 messages Jan 16, 2019 – Apr 8, 2019

lore
Share & tools
lore
#0 lore raw

cover bb: siggen: 2 fixes

The following changes since commit 1ee53881eea3a7ca4d4f6a5ca9c4c6e6488d2348:

perl: fix yet another race failure (2019-01-14 17:38:24 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib rbt/siggen
http://git.pokylinux.org/cgit.cgi//log/?h=rbt/siggen

Robert Yang (2):
bb: siggen: Add a prefix for uuid4
bb: siggen: Print more info when basehash are mis-matched

 bitbake/lib/bb/build.py  | 2 +-
 bitbake/lib/bb/siggen.py | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 bb: siggen: Add a prefix for uuid4

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.

---
 bitbake/lib/bb/build.py  | 2 +-
 bitbake/lib/bb/siggen.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/bb/build.py +1 -1
index 3e2a94e..b8f5cd6 100644
@@ -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):
     """
bitbake/lib/bb/siggen.py +1 -1
index 66aea79..a0ca7e1 100644
@@ -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
 
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/2] bb: siggen: Add a prefix for uuid4

Quoted 3 lines · Robert Yang

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.

The correct fix for the problem as stated is to tweak the otuput of diffsigs/dumpsigs, not change the contents of the file...

Cheers,

Richard

#3 lore raw

Re: [PATCH 1/2] bb: siggen: Add a prefix for uuid4

Quoted 7 lines · Richard Purdie
Quoted 3 lines · Robert Yang

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.

The correct fix for the problem as stated is to tweak the otuput of diffsigs/dumpsigs, not change the contents of the file...

Got it, thanks, I will update it.

// Robert

Quoted 6 lines

Cheers,

Richard

#4 lore raw

PATCH 2/2 bb: siggen: Print more info when basehash are mis-matched

In reply to Robert Yang

This is useful for debugging.

---
 bitbake/lib/bb/siggen.py | 6 ++++++
 1 file changed, 6 insertions(+)
bitbake/lib/bb/siggen.py +6 -0
index a0ca7e1..2d3e4e6 100644
@@ -119,6 +119,12 @@ class SignatureGeneratorBasic(SignatureGenerator):
             k = fn + "." + task
             if not ignore_mismatch and k in self.basehash and self.basehash[k] != basehash[k]:
                 bb.error("When reparsing %s, the basehash value changed from %s to %s. The metadata is not deterministic and this needs to be fixed." % (k, self.basehash[k], basehash[k]))
+                bb.error("The following commands may help:")
+                cmd = "$ bitbake %s -c%s" % (d.getVar('PN'), task)
+                # Make sure sigdata is dumped before run printdiff
+                bb.error("%s -Snone" % cmd)
+                bb.error("Then:")
+                bb.error("%s -Sprintdiff\n" % cmd)
             self.basehash[k] = basehash[k]
 
         self.taskdeps[fn] = taskdeps
Signature · 1 line
2.7.4
#5 lore raw
In reply to Robert Yang

Ping.

// Robert

Quoted 17 lines · Robert Yang

The following changes since commit 1ee53881eea3a7ca4d4f6a5ca9c4c6e6488d2348:

perl: fix yet another race failure (2019-01-14 17:38:24 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib rbt/siggen
http://git.pokylinux.org/cgit.cgi//log/?h=rbt/siggen

Robert Yang (2):
bb: siggen: Add a prefix for uuid4
bb: siggen: Print more info when basehash are mis-matched

  bitbake/lib/bb/build.py  | 2 +-
  bitbake/lib/bb/siggen.py | 8 +++++++-
  2 files changed, 8 insertions(+), 2 deletions(-)