summaryrefslogtreecommitdiffstats
path: root/scripts/gen-lockedsig-cache
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen-lockedsig-cache')
-rwxr-xr-xscripts/gen-lockedsig-cache16
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 9bfae9d832..023015ec41 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -1,5 +1,8 @@
#!/usr/bin/env python3
#
+#
+# Copyright OpenEmbedded Contributors
+#
# SPDX-License-Identifier: GPL-2.0-only
#
@@ -78,11 +81,15 @@ files = set()
sstate_content_cache = {}
for s in sigs:
prefix = s[:2]
+ prefix2 = s[2:4]
if prefix not in sstate_content_cache:
- sstate_content_cache[prefix] = build_sha_cache(prefix)
+ sstate_content_cache[prefix] = {}
+ if prefix2 not in sstate_content_cache[prefix]:
+ sstate_content_cache[prefix][prefix2] = build_sha_cache(prefix + "/" + prefix2)
- for f in sstate_content_cache[prefix][s]:
- files.add(f)
+ if s in sstate_content_cache[prefix][prefix2]:
+ for f in sstate_content_cache[prefix][prefix2][s]:
+ files.add(f)
elapsed = time.perf_counter() - start_time
print("Gathering file list took %.1fs" % elapsed)
@@ -90,8 +97,7 @@ print("Gathering file list took %.1fs" % elapsed)
print('Processing files')
for f in files:
sys.stdout.write('Processing %s... ' % f)
- _, ext = os.path.splitext(f)
- if not ext in ['.tgz', '.siginfo', '.sig']:
+ if not f.endswith(('.tar.zst', '.siginfo', '.sig')):
# Most likely a temp file, skip it
print('skipping')
continue