archive/ is append-only
archive/ on the private pacman repo (sibling of os/, see
REPO_PUBLISH_DESIGN.md §1/§6/repo_publish.sh’s description) is a permanent
historical record. Never delete or move a file out of it, even to correct a
bug that put something there by mistake — restore the active copy in os/ by
copying, not moving, so a copy stays behind in archive/ too.
- Real incident, 2026-07-07: a bug in
repo_publish.sh’s archive-matching logic
(see repo_publish_archive_bug.md) wrongly moved 4 still-current -debug
packages into archive/. First-pass fix mv’d them back to os/x86_64/,
which emptied archive/ of those entries — flagged immediately as wrong.
Corrected by cping them back into archive/ so both locations ended up with
a copy.
- Applies to any future fix/remediation/cleanup that touches
archive/: the
operation must be additive-only from archive/’s perspective — copy files in
when needed, never issue an mv/rm that removes something already there.