Skip to contentSkip to conversation

sstate-cache-management: fix regex for 'sigdata' stamp files

PATCH In review André Draszik 2 participants 2 messages Feb 16, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sstate-cache-management: fix regex for 'sigdata' stamp files

Given file names like

    6.4.do_fetch.sigdata.821b6c62f9f2bd8b7e1378656b8319697a21f6f6e4a351f98dc325a18ef7ed0f,

I'm pretty sure we want to match the dot here, not any character.

Fixes 2fa1b25d7485 ("sstate-cache-management: Rewrite in python") in oe-core
Fixes b723fcaac52f ("sstate-cache-management: Rewrite in python") in poky
---
 scripts/sstate-cache-management.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/sstate-cache-management.py +1 -1
index 09b7aa2aefd8..d3f600bd28f6 100755
@@ -147,7 +147,7 @@ def remove_by_stamps(args, paths):
     for stamps_dir in args.stamps_dir:
         stamps_path = Path(stamps_dir)
         assert stamps_path.is_dir()
-        re_sigdata = re.compile(r"do_.*.sigdata\.([^.]*)")
+        re_sigdata = re.compile(r"do_.*\.sigdata\.([^.]*)")
         all_sums |= set(
             [
                 re_sigdata.search(x.parts[-1]).group(1)
Signature · 1 line
2.44.0.rc0.258.g7320e95886-goog
#1 lore raw
Quoted 9 lines · André Draszik

Given file names like

    6.4.do_fetch.sigdata.821b6c62f9f2bd8b7e1378656b8319697a21f6f6e4a351f98dc325a18ef7ed0f,

I'm pretty sure we want to match the dot here, not any character.

Fixes 2fa1b25d7485 ("sstate-cache-management: Rewrite in python") in oe-core
Fixes b723fcaac52f ("sstate-cache-management: Rewrite in python") in poky

---

Ouch... good catch!

Quoted 28 lines
 scripts/sstate-cache-management.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/sstate-cache-management.py +1 -2
index 09b7aa2aefd8..d3f600bd28f6 100755
@@ -147,7 +147,7 @@ def remove_by_stamps(args, paths):
     for stamps_dir in args.stamps_dir:
         stamps_path = Path(stamps_dir)
         assert stamps_path.is_dir()
-        re_sigdata = re.compile(r"do_.*.sigdata\.([^.]*)")
+        re_sigdata = re.compile(r"do_.*\.sigdata\.([^.]*)")
         all_sums |= set(
             [
                 re_sigdata.search(x.parts[-1]).group(1)
--

2.44.0.rc0.258.g7320e95886-goog

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195744): https://lists.openembedded.org/g/openembedded-core/message/195744
Mute This Topic: https://lists.openembedded.org/mt/104390352/3618097
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 1 line
Alex Kiernan