feat(db-archive): Archive package files atomically
With the archive and repos no longer hosted on the same server[1], we
can let archivetools[2] update the packages directory on the archive
server once a day and risk losing packages (if a package is updated
multiple times in the same day).
This is not ideal, so instead we will continue as before and let
db-archive store the archived packages locally and then we will transfer
them from the repos server to the archive server.
The transfer part is more easily done, if the archived package files are
copied in place in an atomic way on the repos server as we don't risk
transferring partially written files that way.
[1] https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/B66SQUW4HOJAN2WHG4RLEBLYWNWOSF3Y/
[2] https://gitlab.archlinux.org/archlinux/archivetools/-/blob/d5cbd5a5a9454eecd5c46b64ebc08d5087a25f2d/archive.sh#L141-L200
I haven't tested this, but the code should be correct.