ci: verify-checksums: ignore archived

Because archived is neglected, the sources of packages therein can have
dead links, causing any MR that touches them to fail. Since we don't want
to fix archived packages, just ignore them entirely.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8661>
This commit is contained in:
Aster Boese
2026-05-29 17:36:08 +00:00
parent 869c1036e7
commit 67d104aa0b
+12 -1
View File
@@ -36,17 +36,28 @@ if __name__ == "__main__":
# aports later. We might be given a changed aport from e.g. extra-repos/systemd when # aports later. We might be given a changed aport from e.g. extra-repos/systemd when
# that repo is not enabled # that repo is not enabled
buildable_pkgs = set() buildable_pkgs = set()
archived = set()
for path in pmb.core.pkgrepo.pkgrepo_iter_package_dirs(): for path in pmb.core.pkgrepo.pkgrepo_iter_package_dirs():
# Store archived packages for matching later
if os.path.split(os.path.split(path)[0])[1] == 'archived':
archived.add(os.path.basename(path))
continue
buildable_pkgs.add(os.path.basename(path)) buildable_pkgs.add(os.path.basename(path))
# To store a list of packages from extra-repos/systemd for special handling # To store a list of packages from extra-repos/systemd for special handling
# later: # later:
systemd_pkgs = list() systemd_pkgs = list()
# Filter out packages are not found in enabled repos # Filter out packages are not found in enabled repos or are in archived
# (Iterate over copy of packages, because we modify it in this loop) # (Iterate over copy of packages, because we modify it in this loop)
for package in packages.copy(): for package in packages.copy():
if package not in buildable_pkgs: if package not in buildable_pkgs:
# Specifically handle archived since it could include packages
# who's sources are dead
if package in archived:
print(f"{package}: archived, skipping")
packages.remove(package)
continue
print(f"{package}: not in current repo, skipping") print(f"{package}: not in current repo, skipping")
packages.remove(package) packages.remove(package)
# FIXME: this should probably be more generic, if other repos are added # FIXME: this should probably be more generic, if other repos are added