Re: How to pin certain packages from experimental?

2005-03-27 Thread Marc Haber
Hi,

On Sun, 27 Mar 2005 04:18:48 +1000, Paul TBBle Hampson
[EMAIL PROTECTED] 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

-- 
-- !! 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



Re: How to pin certain packages from experimental?

2005-03-26 Thread Paul TBBle Hampson
On Sat, Mar 26, 2005 at 07:28:51AM +0100, Marc Haber wrote:
 On Tue, 22 Mar 2005 02:21:39 +1100, [EMAIL PROTECTED] (Paul
 Hampson) wrote:
 On Mon, Mar 21, 2005 at 12:36:52PM +0100, Marc Haber wrote:
  On Mon, 21 Mar 2005 08:47:22 +0100, Adeodato Simó [EMAIL PROTECTED]
  wrote:
  * Marc Haber [Mon, 21 Mar 2005 08:03:21 +0100]:

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

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

   |  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/[EMAIL PROTECTED]:~$   

   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.

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

 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.

Yeah, ignore that. That was the manpage explaining the _result_ of it's default
preference assignments, but under the assumption that you have a target
distribution set.

555 next to the version number appears to be the priority of the pin on that
package.

In fact, I finally gave in, and copied your pin preference into my apt
preferences file.

Basically, with my 990 pin (ie. target distribution), I get:
exim4-daemon-light:
  Installed: (none)
  Candidate: 4.50-4
  Package Pin: (not found)
  Version Table:
 4.50-4 555
990 http://192.168.0.1 sid/main Packages

And without my 990 pin I get:
exim4-daemon-light:
  Installed: (none)
  Candidate: (none)
  Package Pin: (not found)
  Version Table:
 4.50-4 555
500 http://192.168.0.1 sid/main Packages

Which is the same behaviour you're seeing. In short, a package pin will select
_no package_ ahead of all available packages if it is pinned higher.

This seems a weird choice to make, as it makes what you're trying to do (grab
any version of this package from experimental if it's higher than the one in
unstable, but track unstable otherwise) actually impossible.

Basically, the process as far as I can tell is:
Ignore packages that don't meat version criteria supplied
Ignore packages lower versioned than current, unless priority  1000
Install highest priority remaining package
In case of priority tie, take pinned package == This step is the issue here
Possibly this step should be skipped if the pin doesn't match anything.
In case of no pinned package, take highest version

So pin your experimental package _below_ your target distribution (eg. 450 for
your current setup, 900 if you set a target distribution) and then apt-get
install the package from experimental. The apt will track the package in
experimental as long as it stays higher-versioned than the one in unstable.

In my case, I'm doing the opposite. Don't grab packages from
non-Debian/unstable distros unless needed to fufill a dependancy that can't be
matched from Debian unstable, or I specifically apt-get it. Then track that
repository so pinning Debian Unstable/main to 990, experimental and the rest
of Debian Unstable to 900, and letting everything else fall to 500 works well
for me.

 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.

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

No distribution is treated as the target distribution in that case,
everything gets 500 by default.

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

Because unless you play with pinning, the target release isn't
interesting, you're assumed to want the latest version of a package
that shows up in your available lists.

 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.

See? 

Re: How to pin certain packages from experimental?

2005-03-25 Thread Marc Haber
On Tue, 22 Mar 2005 02:21:39 +1100, [EMAIL PROTECTED] (Paul
Hampson) wrote:
On Mon, Mar 21, 2005 at 12:36:52PM +0100, Marc Haber wrote:
 On Mon, 21 Mar 2005 08:47:22 +0100, Adeodato Simó [EMAIL PROTECTED]
 wrote:
 * 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/[EMAIL PROTECTED]:~$   
 
  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.

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

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
=1000 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?

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

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 = 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=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.

I see.

Greetings
Marc

-- 
-- !! 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



Re: How to pin certain packages from experimental?

2005-03-21 Thread Marc Haber
On Mon, 21 Mar 2005 08:47:22 +0100, Adeodato Simó [EMAIL PROTECTED]
wrote:
* 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/[EMAIL PROTECTED]:~$   

 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.

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

-- 
-- !! 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



Re: How to pin certain packages from experimental?

2005-03-21 Thread Paul Hampson
On Mon, Mar 21, 2005 at 12:36:52PM +0100, Marc Haber wrote:
 On Mon, 21 Mar 2005 08:47:22 +0100, Adeodato Simó [EMAIL PROTECTED]
 wrote:
 * 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/[EMAIL PROTECTED]:~$   
 
  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.

 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)
[EMAIL PROTECTED]

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.
---


signature.asc
Description: Digital signature


How to pin certain packages from experimental?

2005-03-20 Thread Marc Haber
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 [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to pin certain packages from experimental?

2005-03-20 Thread Adeodato Simó
* 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 [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to pin certain packages from experimental?

2005-03-20 Thread Marc Haber
On Sun, 20 Mar 2005 19:10:24 +0100, Adeodato Simó [EMAIL PROTECTED]
wrote:
* Marc Haber [Sun, 20 Mar 2005 17:40:46 +0100]:
 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.

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

 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.

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
-- 
-- !! 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



Re: How to pin certain packages from experimental?

2005-03-20 Thread Don Armstrong
On Sun, 20 Mar 2005, Marc Haber wrote:
 Is this documented somewhere? Pinning is such a powerful tool, and
 nobody seems to really understand it.

See apt_preferences(5) [specifically the APT's Default Priority
Assignments section.]


Don Armstrong

-- 
Cheop's Law: Nothing ever gets built on schedule or within budget.
 -- Robert Heinlein _Time Enough For Love_ p242

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to pin certain packages from experimental?

2005-03-20 Thread Marc Haber
On Sun, 20 Mar 2005 12:43:52 -0800, Don Armstrong [EMAIL PROTECTED]
wrote:
On Sun, 20 Mar 2005, Marc Haber wrote:
 Is this documented somewhere? Pinning is such a powerful tool, and
 nobody seems to really understand it.

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/[EMAIL PROTECTED]:~$   

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

-- 
-- !! 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



Re: How to pin certain packages from experimental?

2005-03-20 Thread Adeodato Simó
* 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/[EMAIL PROTECTED]:~$   

 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 [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]