diff mbox series

[1/2] checklayer: Really fix regex in get_signatures

Message ID 20260328-fix-checklayer-3-v1-1-53da29ef5c35@pbarker.dev
State Accepted, archived
Commit 225923f3bfec8e793ce1ddb547aef53fcfbc0778
Headers show
Series Some more yocto-check-layer fixes | expand

Commit Message

Paul Barker March 28, 2026, 9:49 a.m. UTC
The previous attempt to fix the regex in get_signatures was only a
partial success. We should just be comparing unihash values, inclusion
of the taskhash value in our comparison adds no benefit. Inclusion of
the task hash also results in invalid bitbake-diffsigs commands being
recommended if there are conflicting signatures.

Fixes: a2f7052cf832 ("checklayer: Fix regex in get_signatures")
Signed-off-by: Paul Barker <paul@pbarker.dev>
---
 scripts/lib/checklayer/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index 15459b6e0486..f9ba44d08d88 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -324,7 +324,7 @@  def get_signatures(builddir, failsafe=False, machine=None, extravars=None):
         else:
             raise
 
-    sig_regex = re.compile(r"^(?P<task>[^:]*:[^:]*):(?P<hash>.*) .$")
+    sig_regex = re.compile(r"^(?P<task>[^:]*:[^:]*)(:(?P<taskhash>[^:]*))?:(?P<hash>.*) .$")
     tune_regex = re.compile(r"(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
     current_tune = None
     with open(sigs_file, 'r') as f: