[local mirrors] Prefer repo X when packages identical

Panu Matilainen pmatilai at laiskiainen.org
Mon Jun 19 11:36:52 PDT 2006


On Sun, 2006-06-18 at 15:48 +0200, Axel Thimm wrote:
> Hi,
> 
> this is not about partial enabling of repos via priorities and similar
> ugly setups. :)
> 
> What I want to achieve is to have a local copy of a repo which may or
> may not be up to date. In case the same package to be installed exists
> in several repos I'd like apt to pick this one instead of going http
> or over NFS. If the local copy is in sync, the packages are drawn from
> there. If not, some (newer) packages are drawn from the net, others
> (unchanged) from the local copy.
> 
> A first step to get this done would be to have file:// repos preferred
> over non-local repos if priorities/evra otherwise match.
> 
> This still leaves open the case of local storage vs NFS which appears
> to apt as both "local". But maybe this is too esoteric to build-farms,
> so maybe not something to really consider. Still if there were some
> kind of deterministic preference mechanism I'd gladly use that - I
> know that apt orders the repos internally depending on the order
> reading the repos in, and since sources.list.d this has become very
> random :(

Apt still honours the sources.list order, but sources.list.d order is of
course a bit random because it's based on alphabetical ordering based on
filename, IIRC. For local "custom" repositories putting them into the
main sources.list should work, the main list should take priority over
the things in sources.list.d.

> 
> If this is useful maybe this can get into the new discussed
> configuration syntax? If priorities are prepended to evr, then since
> these are suffixed they should be called "unimportances"
> (at least according to a quick search on antonyms of "priorities" ;)

Having some kind of "preference order" (whatever you want to call it :)
setting sounds fine to me.

	- Panu -




More information about the Apt-Rpm mailing list