Pinning repomd repositories

Panu Matilainen pmatilai at laiskiainen.org
Wed Apr 18 23:06:40 PDT 2007


On Tue, 17 Apr 2007, Johannes Kastl wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I changed to openSUSE 10.2, but could not quit to use apt. It is just
> what I need.
>
> There is one flaw, apt seems to have problems pinning repositories.
> Or, to be exact: apt doesnt like components that contain a /
>
> An example:
>
> While it works to pin a repo
> repomd ftp://ftp.gwdg.de/pub/linux/misc/suser-jengelh/ SUSE-10.2/
> with
> Package: *
> Pin: release c=SUSE-10.2
> Pin-Priority: 50
>
> it doesnt when using
> repomd ftp://ftp.gwdg.de/pub/linux/misc/ suser-jengelh/SUSE-10.2/
>
> It doesnt matter (or it didnt in my tests) wether I just put
> suser-jengelh* or anything else, it just isnt working.
>
> QUESTION:
>
> 1. Is this behaviour intended?
>
> 2. Is there an easy solution?

Yes to both. With repomd's the last part of the sources.list line is not 
actually a "component" but a "distribution" item, the concept of 
components doesn't exist with repomd. To better support pinning, apt 
converts the "distribution" part to something that can be used as a 
component in pinning, namely it converts slashes to dashes to make it more 
"readable". So in the above case, you should use

Pin: release c=suser-jangelh-SUSE-10.2

Oh and btw if in doubt, have a look at 'apt-cache policy' output, you'll 
see the available pinning elements listed there.

> and if not
>
> 3. Would it be possible to fix apt so that it is possible to pin more
> than one repo? Have in mind that many repos have similar last parts
> (10.2, Suse-10.2, openSUSE_10.2, suse,...).
> It would be nice to have that, cos now I just see that one package out
> of the pinned repo is from this repo, cos there is just
>
> 50 ftp://ftp.gwdg.de SUSE-10.2/ repomd
> 100 RPM Database
>
> and I must remember that the one that has only SUSE-10.2/ is the
> pinned one.

This is exactly why it behaves the way it does. It does require the 
sources.list entry be formatted carefully, eg

repomd ftp://ftp.gwdg.de/pub/linux/misc/ suser-jengelh/SUSE-10.2/
repomd ftp://ftp.gwdg.de/pub/linux/misc/suser-jengelh/ SUSE-10.2/

..are both valid but the latter provides less information for pinning 
purposes.

 	- Panu -



More information about the Apt-Rpm mailing list