[pacman-dev] Repository management

Xyne xyne at archlinux.ca
Tue May 16 03:32:02 UTC 2017


Xyne wrote:

>Obviously there will be some redundancy in the up to 3 copies of
><repo>-<timestamp>.db but I think that's better than e.g. breaking pkgfile
>searches after an upgrade.

Just to expand on that, the worst case scenario leads to the same level of
redundancy as we currently have with complete *.files databases, while the best
case leads to no redundancy, all the while preserving the independence of
pacman -S... and pacman -F... (and whatever else you want to add).

>With this approach you could also download the latest version of the sync
>databases as <repo>-<timestamp>.db without symlinking <repo>.db to it, and then
>use that to query upgradable packages and other info from the mirror.

To make that work with my suggestion for cleaning up old timestamped databases,
add a symlink named e.g. <repo>.future, <repo>.next or <repo>.remote. That could
be used by e.g. checkupdates or pre-emptive package downloading scripts.

There may even be cases where the cleanup is unwanted, such as for a script
that regularly downloads databases and upgradable packages to provide an
incremental upgrade path at a later date (obviously regular updates are
preferred, but maybe useful and reasonable in some rare cases).

In my previous reply, I had forgotten that pacman -Sc prompts for the database
and pkgcache cleanups independently. Forget what I said about automatic
cleanups. Offload that to pacman -Sc.

Regards,
Xyne


More information about the pacman-dev mailing list