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

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

Details

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

Commit Message

Robert Yang Jan. 16, 2019, 6:30 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 a0ca7e1..2d3e4e6 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