[arch-general] Question about repository updates and atomicity
Johannes Ernst
jernst at cldstr.com
Thu Aug 15 03:08:21 EDT 2013
I'm trying to understand what may and may not go wrong between package
uploads to a repository, repository synchronization via rsync (which seems
to be the preferred method for mirrors to get their stuff) and downloads
via pacman.
Assume a developer uploads a new version of two packages to a repository.
My understanding is that uploads delete the older version of the uploaded
package currently in the repository. (unlike other package management
systems e.g. debian's where multiple versions of the same package can
reside in the same repository).
An hour later, a mirror repository starts rsycing. While the rsync is
ongoing, a user uses pacman to download both packages from the mirror.
Question: what mechanisms exists, if any, to avoid that the user gets the
old version of package A and the new version of package B? (assume the
rsync is still ongoing while the download occurs)
It seems the "safe" way of doing the rsync would be to take down the mirror
during the critical section (when all old versions are removed and the new
ones put there instead), and restart it afterwards? Or is there something
somewhere that I'm not seeing? The debian guys probably keep the old
version(s) around for exactly that reason...
Any insight very much appreciated ...
Cheers,
Johannes.
More information about the arch-general
mailing list