Debian Developers - How to pin certain packages from experimental?

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > March 2005 > How to pin certain packages from experimental?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to pin certain packages from experimental?
Marc Haber

2005-03-20, 5:56 pm

Hi,

On a development system, I'd like to have experimental and unstable in
the sources.list, and to have experimental pinned down to a priority
tha experimental is never considered. For certain packages, I'd like
apt to consider experimental as well, taking whatever is newer from
experimental and unstable.

My sources.list:
deb http://debian.example/debian/ sid main contrib
deb http://debian.example/debian ../project/experimental main contrib

My preferences:
Package: *
Pin: release o=Debian,a=experimental
Pin-Priority: -12

Package: exim4-daemon-light
Pin: release o=Debian,a=experimental
Pin-Priority: 555

The system has exim4-daemon-light 4.50-1 installed. That version has
been in experimental, and has been removed from there when 4.50-2 was
uploaded to unstable. However, the system in question has not updated
automatically.

$ apt-cache policy exim4-daemon-light
exim4-daemon-light:
Installed: 4.50-1
Candidate: 4.50-1
Package Pin: (not found)
Version Table:
4.50-4 555
500 http://debian.debian.zugschlus.de sid/main Packages
*** 4.50-1 555
100 /var/lib/dpkg/status
4.44-2 555
500 http://debian.debian.zugschlus.de sarge/main Packages
$

What am I doing wrong?

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Adeodato Simó

2005-03-20, 5:56 pm

* Marc Haber [Sun, 20 Mar 2005 17:40:46 +0100]:
> Hi,


> On a development system, I'd like to have experimental and unstable in
> the sources.list, and to have experimental pinned down to a priority
> tha experimental is never considered. For certain packages, I'd like
> apt to consider experimental as well, taking whatever is newer from
> experimental and unstable.


Not sure if it will solve your problem, but I was once advised to pin
all of experimental to 101. This has the effect of not installing
experimental packages by default, but once you manually pull one (with
-t experimental), that package is "tracked", i.e. upgraded when a new
upload to experimental happens.

> Package: exim4-daemon-light
> Pin: release o=Debian,a=experimental
> Pin-Priority: 555


Perhaps you should've used 500 here, so that a version comparison
happens between unstable and experimental (both at 500). If not,
you're stating that you prefer exim4 packages from experimental
regardless of their version.

--
Adeodato Simó
EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621

A. Because it breaks the logical sequence of discussion
Q. Why is top posting bad?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Haber

2005-03-20, 5:56 pm

On Sun, 20 Mar 2005 19:10:24 +0100, Adeodato Sim=F3 <asp16@alu.ua.es>
wrote:
>* Marc Haber [Sun, 20 Mar 2005 17:40:46 +0100]:
>
> Not sure if it will solve your problem, but I was once advised to pin
> all of experimental to 101. This has the effect of not installing
> experimental packages by default, but once you manually pull one (with
> -t experimental), that package is "tracked", i.e. upgraded when a new
> upload to experimental happens.


Is this documented somewhere? Pinning is such a powerful tool, and
nobody seems to really understand it.

>
> Perhaps you should've used 500 here, so that a version comparison
> happens between unstable and experimental (both at 500). If not,
> you're stating that you prefer exim4 packages from experimental
> regardless of their version.


No, 500 has the same result. It is the 555 I chose to make sure it is
actually this pin being honored, minimizing the chance of a 500 coming
in from somewhere else.

Preferring exim4 packages from experimental even if they do not exist
isn't a very good idea though.

Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Mannheim, Germany | Beginning of Wisdom " | =
http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 =
72739834
Marc Haber

2005-03-21, 2:55 am

On Sun, 20 Mar 2005 12:43:52 -0800, Don Armstrong <don@debian.org>
wrote:
>On Sun, 20 Mar 2005, Marc Haber wrote:
>
>See apt_preferences(5) [specifically the "APT's Default Priority
>Assignments" section.]


Duh.

I wouldn't have posted here without trying to read manpages first. The
manpage says that apt installs the highest priority version, and if
two or more versions have the same priority, the one with the highest
version number is installed. The thread starter clearly shows that
this is not the case.

|$ apt-cache policy exim4-daemon-light
|exim4-daemon-light:
| Installed: 4.50-1
| Candidate: 4.50-1
| Package Pin: (not found)
| Version Table:
| 4.50-4 555
| 500 http://debian.debian.zugschlus.de sid/main Packages
| *** 4.50-1 555
| 100 /var/lib/dpkg/status
| 4.44-2 555
| 500 http://debian.debian.zugschlus.de sarge/main Packages
|[2/502]mh@lefler:~$ =20

This shows that sid and sarge are at priority 500, and that all
available versions (4.44-2, 4.50-1 and 4.50-4) are pinned to priority
555. So, it should upgrade from the installed 4.50-1 to 4.50-4, which
it doesn't do.

And I see that the pin is somewhat wrong, as the 555 pin should only
apply to packages available from the experimental distribution and not
to sarge and sid.

So, I am sorry to say that I need more explanation than given in the
apt_preferences man page.

Greetings
Marc

--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Mannheim, Germany | Beginning of Wisdom " | =
http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 =
72739834
Adeodato Simó

2005-03-21, 2:55 am

* Marc Haber [Mon, 21 Mar 2005 08:03:21 +0100]:

> | Version Table:
> | 4.50-4 555
> | 500 http://debian.debian.zugschlus.de sid/main Packages
> | *** 4.50-1 555
> | 100 /var/lib/dpkg/status
> | 4.44-2 555
> | 500 http://debian.debian.zugschlus.de sarge/main Packages
> |[2/502]mh@lefler:~$


> available versions (4.44-2, 4.50-1 and 4.50-4) are pinned to priority
> 555.


> And I see that the pin is somewhat wrong, as the 555 pin should only
> apply to packages available from the experimental distribution and not
> to sarge and sid.


The priority of each version/location is the number at the left of it,
in this case, 500, 100, 500. Those numbers are correct.

I've seen people asking about the number at the right of the version
several times (such number is usually 0). IME, it's just the last
priority you specified for the package in /etc/apt/preferences for
that package.

As for the behavior you experience, I'm afraid I have no explanation,
but perhaps it's just apt normal behavior for that high priority...

--
Adeodato Simó
EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621

I try to keep an open mind, but not so open that my brains fall out.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Haber

2005-03-21, 7:48 am

On Mon, 21 Mar 2005 08:47:22 +0100, Adeodato Sim=F3 <asp16@alu.ua.es>
wrote:
>* Marc Haber [Mon, 21 Mar 2005 08:03:21 +0100]:
>
>
>
> The priority of each version/location is the number at the left of it,
> in this case, 500, 100, 500. Those numbers are correct.


So you're basically saying that my pin doesn't work at all?

How got 4.50-1 installed then in the first place?

Greetings
Marc

--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Mannheim, Germany | Beginning of Wisdom " | =
http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 =
72739834
Paul Hampson

2005-03-21, 6:03 pm

On Mon, Mar 21, 2005 at 12:36:52PM +0100, Marc Haber wrote:
> On Mon, 21 Mar 2005 08:47:22 +0100, Adeodato Simó <asp16@alu.ua.es>
> wrote:
[vbcol=seagreen]
[vbcol=seagreen]
[vbcol=seagreen]
> So you're basically saying that my pin doesn't work at all?


Well, the above output doesn't show a version in experimental...

"How APT Interprets Priorities" in apt-preferences(5) seems to suggest
that a '500' priority won't be upgraded automatically, that's the
priority assigned to non-target distribution packages:

"causes a version to be installed unless there is a version available
belonging to some other distribution or the installed version is more
recent"

Try setting sid (or sarge) as your target distribution, and 4.50-4
should rise to 990, and be auto-upgraded. However, this means your
experimental pin for this package is too low, and needs to be "990 < P
<=1000" to get the effect of "If there's a newer one in experimental,
grab it".

> How got 4.50-1 installed then in the first place?


That would depend on the policy state when it was instslled.

From what you said earlier, I'd guess that 4.50-1 was installed when it
was in experimental, and the priority was therefore 500 < x <= 990,
which means it'll be installed if there's no version belonging to the
target release. And the above policy output shows there _is_ no target
release set.

The upshot here (and the same lesson I learnt futzing with apt-pinning)
is: Set a target release, or it won't do what you expect. ^_^

Or at the very least, (if for example you use other archives that
also claim to be unstable, and you only want to fall back on them
if Debian/unstable doesn't have what you need

Package: *
Pin: release o=Debian,a=Unstable,c=main
Pin-Priority: 990

Which is roughly the same as picking a target release, but doesn't
give 990 to non-Debian archives marked Unstable.

--
-----------------------------------------------------------
Paul "TBBle" Hampson, MCSE
8th year CompSci/Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson@Anu.edu.au

"No survivors? Then where do the stories come from I wonder?"
-- Capt. Jack Sparrow, "Pirates of the Caribbean"

This email is licensed to the recipient for non-commercial
use, duplication and distribution.
-----------------------------------------------------------

Marc Haber

2005-03-26, 2:48 am

On Tue, 22 Mar 2005 02:21:39 +1100, Paul.Hampson@anu.edu.au (Paul
Hampson) wrote:
>On Mon, Mar 21, 2005 at 12:36:52PM +0100, Marc Haber wrote:
priority[vbcol=seagreen]
>
only[vbcol=seagreen]
not[vbcol=seagreen]
>
it,[vbcol=seagreen]
>
>
>Well, the above output doesn't show a version in experimental...


When 4.50-1 was installed on the system in question. there was 4.50-1
in experimental. 4.50-2 went to unstable and thus 4.50-1 was
automatically removed from experimental.

>"How APT Interprets Priorities" in apt-preferences(5) seems to suggest
>that a '500' priority won't be upgraded automatically, that's the
>priority assigned to non-target distribution packages:


The previous 4.44 version on the system was updated to 4.50-1 from
experimental while the 500 pin was in place.

>"causes a version to be installed unless there is a version available
>belonging to some other distribution or the installed version is more
>recent"


4.50-4 is part of the target distribution, and there is no version
available belonging to some other distribution, and the installed
version is not more recent. Or does apt get confused by the 4.44-2
package available from sarge?

>Try setting sid (or sarge) as your target distribution, and 4.50-4
>should rise to 990, and be auto-upgraded. However, this means your
>experimental pin for this package is too low, and needs to be "990 < P
><=3D1000" to get the effect of "If there's a newer one in experimental,
>grab it".


Hm. What distribution does apt take as target distribution if none is
set in /etc/apt/apt.conf.d?

>
>That would depend on the policy state when it was instslled.


The policy was the same as listed above, pinning the distribution to
500.

>From what you said earlier, I'd guess that 4.50-1 was installed when it
>was in experimental, and the priority was therefore 500 < x <=3D 990,
>which means it'll be installed if there's no version belonging to the
>target release. And the above policy output shows there _is_ no target
>release set.


The priority was 500.

Shouldn't installation set a target release automatically? Why don't
I have a target release set?

>The upshot here (and the same lesson I learnt futzing with apt-pinning)
>is: Set a target release, or it won't do what you expect. ^_^


I see. I expected that to happen automatically.

>Or at the very least, (if for example you use other archives that
>also claim to be unstable, and you only want to fall back on them
>if Debian/unstable doesn't have what you need
>
>Package: *
>Pin: release o=3DDebian,a=3DUnstable,c=3Dmain
>Pin-Priority: 990
>
>Which is roughly the same as picking a target release, but doesn't
>give 990 to non-Debian archives marked Unstable.


I see.

Greetings
Marc

--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Mannheim, Germany | Beginning of Wisdom " | =
http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 =
72739834
Marc Haber

2005-03-27, 5:55 pm

Hi,

On Sun, 27 Mar 2005 04:18:48 +1000, Paul TBBle Hampson
<Paul.Hampson@anu.edu.au> wrote:
>Good. ^_^ I hope that helps.


It does. I still don't understand the concept fully, and my apt still
doesn't do what I want it to, but I have tried to write what I know
down in the Debian Wiki on http://wiki.debian.net/?AptPreferences. I
would be most thankful if somebody more familiar with apt could
correct any mistakes found there and maybe give additional
information.

Greetings
Marc

--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Mannheim, Germany | Beginning of Wisdom " | =
http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 =
72739834
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com