[bitbake-devel,3/3,V2] bb: siggen: Print more info when basehash are mis-matched

Submitted by Robert Yang on April 17, 2019, 11:01 a.m. | Patch ID: 160503

Details

Message ID 1a10a265b66dda0223a7a4064c99bf632df29f5a.1555498609.git.liezhi.yang@windriver.com
State New
Headers show

Commit Message

Robert Yang April 17, 2019, 11:01 a.m.
This is useful for debugging.

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

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 89bf533..7b9f3de 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -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