fix: group packs on everything that shapes them

group_identical_platforms fingerprinted each file by destination, sha1 and md5. Two platforms whose lists differed only in required, zipped_file, size or crc32, or in how the frontend checks a file, would have shared the representative's pack and verify result. The fingerprint now carries every field of every entry and the platform's verification_mode and hash_rule. No current platform is regrouped.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 02:14:14 +02:00
1 parent 23a999153d
commit c42c756b4a
2 files changed
+39 -7

No files matched your search

+11 -7
View File
@@ -1938,13 +1938,17 @@ def group_identical_platforms(
inherits[platform] = False
continue
entries = []
for sys_id, system in sorted(config.get("systems", {}).items()):
for fe in system.get("files", []):
dest = fe.get("destination", fe.get("name", ""))
sha1 = fe.get("sha1", "")
md5 = fe.get("md5", "")
entries.append(f"{dest}|{sha1}|{md5}")
# Every field of every entry: the builder reads required, zipped_file,
# size and crc32 too, so two lists that differ only there are two
# packs. So is the way the frontend checks a file.
entries = [
json.dumps(fe, sort_keys=True, default=str)
for _sys_id, system in sorted(config.get("systems", {}).items())
for fe in system.get("files", [])
]
entries.append(
f"mode={config.get('verification_mode', '')}|rule={config.get('hash_rule', '')}"
)
fp = hashlib.sha1("|".join(sorted(entries)).encode()).hexdigest()
cores = config.get("cores")