You are not logged in.

#1 2024-10-24 17:50:30

sp_craftsman
Member
Registered: 2024-07-16
Posts: 1

Building extra.db from a mirror

The local mirror I use has been suffering from an out of date extra.db for a good while, and I'm having to resort to using a slower mirror. Their mirror, however, has all the up-to-date packages I need. I was wondering if there was a way to build a database for it myself and have pacman use that. It is not something that's bothering me THAT much, except that I have a 1MBps internet connection, and that's the only mirror that gives me some 10MBps sync speeds. Also, I figured it would be fun to do something like this. Any help is greatly appreciated!

Offline

#2 2024-10-24 19:02:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Building extra.db from a mirror

You could just download the db from the slower mirror and place it appropriately in /var/lib/pacman/sync, then update the packages with pacman with the faster mirror at the top of the mirrorlist.  In order to let pacman handle the core.db properly this might take a couple steps:

pacman -Sy
curl ... # from the slow mirror extra.db to /var/lib/pacman/sync/extra.db
pacman -Su

Note there are two flavors of risk here: 1) the -Sy must be followed soon after by that -Su, do not stop part way or you'll set yourself up for partial upgrades, and 2) the fast mirror might not have the same package versions as the slow mirror's db and you'll end up getting 404 errors.  Perhaps more importantly, though, if the fast mirror isn't managed properly to have a db, do you really trust its content?  I wouldn't.

EDIT: actually another problem is that this is just a horrible idea from the start... you don't want your dbs out of sync with each other.  You could get both dbs from the slow mirror, then use the fast mirror just to download any package files it has, then complete the upgrade using the slow mirror for anything that was not on the fast mirror.  This might be best with two pacman configs, a default for the slow but correct mirror and another for the fast mirror:

pacman -Sy
pacman -Suw --config /path/to/fast-mirror-config
pacman -Su

Using the questionable but fast mirror just as a source to retrieve package files from should be much safer.

Last edited by Trilby (2024-10-24 19:30:48)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB