fix: purge the old checksum signature with packs

The stale-pack purge kept its own list of release files and left
SHA256SUMS.txt.sig behind, which a skipped signing step then published
beside a new checksum list. release.sums now owns the release set.
This commit is contained in:
Abdessamad Derraz committed 2026-11-24 01:14:05 +01:00
1 parent e51dc14d7b
commit 8348ba1f32
7 files changed
+42 -15

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ COMMANDS = {
),
"release_record.py": ("model/releaserecord.py", "release/record.py"),
"release_notes.py": ("release/notes.py",),
"check_release.py": ("release/check.py",),
"check_release.py": ("release/check.py", "release/sums.py"),
"check_release_assets.py": ("release/assets.py",),
"sync_release_assets.py": ("release/sync.py",),
"restore_large_files.py": ("release/restore.py",),
+3 -2
View File
@@ -58,8 +58,9 @@ SIBLING_IMPORTS: dict[str, frozenset[str]] = {
# site's source trees and profile_sync's report.
"freshness": frozenset({"scraper", "exporter", "packs", "installer_build", "sitegen", "profiling"}),
# Step 5 builds the packs in memory, and the offline export refusal asks
# the exporters which ones patch a cached original.
"orchestrate": frozenset({"packs", "exporter"}),
# the exporters which ones patch a cached original. The stale-pack purge
# deletes the release set the release code defines.
"orchestrate": frozenset({"packs", "exporter", "release"}),
"games": frozenset(),
}
+19
View File
@@ -338,5 +338,24 @@ class PartsAreExplainedWhereTheyAreDownloaded(unittest.TestCase):
self.assertTrue("cmd /c copy /b" in line, line.strip())
class PurgeTakesTheWholeReleaseSet(unittest.TestCase):
"""The purge kept the last release's SHA256SUMS.txt.sig beside new packs
and a new checksum list: published unsigned, every verify failed."""
def test_the_signature_goes_with_the_packs(self) -> None:
from orchestrate.build import purge_stale_packs
with tempfile.TemporaryDirectory() as tmp:
dist = Path(tmp)
names = ("A_BIOS_Pack.zip", "A_BIOS_Pack.zip.001", "SHA256SUMS.txt",
"SHA256SUMS.txt.sig", "release.json")
for name in names:
(dist / name).write_bytes(b"x")
with contextlib.redirect_stdout(io.StringIO()):
purge_stale_packs(str(dist))
left = sorted(p.name for p in dist.iterdir() if p.name != ".lock")
self.assertEqual(left, ["release.json"])
if __name__ == "__main__":
unittest.main()