Bug#623706: possible mistakes in apt_preferences(5)
Control: tag -1 pending
On Wed, Apr 27, 2011 at 09:17:49AM +0200, Julian Andres Klode wrote:
> On Di, 2011-04-26 at 23:24 +0200, Christoph Anton Mitterer wrote:
> > In addition, the following seems to be strange:
> >
> > The manpage says:
> > > If the target release has been specified then APT uses the following
> > > algorithm to set the priorities of the versions of a package. Assign:
> > >
> > > priority 1
> > > to the versions coming from archives which in their Release files
> > > are marked as "NotAutomatic: yes" but not as "ButAutomaticUpgrades:
> > > yes" like the debian experimental archive.
> > >
> > > priority 100
> > > to the version that is already installed (if any) and to the
> > > versions coming from archives which in their Release files are
> > > marked as "NotAutomatic: yes" and "ButAutomaticUpgrades: yes" like
> > > the debian backports archive since squeeze-backports.
> > >
> > > priority 500
> > > to the versions that are not installed and do not belong to the
> > > target release.
> > >
> > > priority 990
> > > to the versions that are not installed and belong to the target
> > > release.
> >
> >
> > No consider I've set:
> >
> > APT::Default-Release "stable";
> > and have added stable and testing in sources list.
> >
> > For package foo, the following versions are known:
> > installed: 1.0
> > stable: 1.0
> > testing: 2.0
> >
> > I'd conclude from the above that this means:
> >
> > 1.0 == 100 (and not 990, as THIS version IS installed)
> > 2.0 == 500 (as THIS version is NOT installed)
> >
> > So the package should be upgraded, right? But it is not.
> Obviously not. You first assign 100, but then this gets replaced by 990.
> It's done exactly as the manual page says, not as human thinking may
> suggest.
>
> while(...) {
> if (...) pin = 1;
> if (...) pin = 100;
> if (...) pin = 500;
> if (...) pin = 900;
> }
Sorry, I overlooked the not installed part. Will be fixed in the
next upload to experimental.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
- If you don't I might ignore you.
Reply to: