[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#623706: possible mistakes in apt_preferences(5)



On Fr, 2011-04-22 at 13:30 +0200, Christoph Anton Mitterer wrote:
> Package: apt
> Version: 0.8.14.1
> Severity: minor
> 
> 
> Hi.
> 
> Either I have some misunderstanding here, or something is somwhere documented wrong.
> apt_preferences(5) says:
>        Sometimes the installed version of a package is more recent than the
>        version belonging to the target release, but not as recent as a version
>        belonging to some other distribution. Such a package will indeed be
>        upgraded when apt-get install some-package or apt-get upgrade is
>        executed, because at least one of the available versions has a higher
>        priority than the installed version.
> 
> Ok e.g. something like this:
> 
> Consider stable is the target relese. Package "foo" has the following versions
> stable  1.00
> testing 2.01
> installed 2.00
> 
> (i.e. foo was installed manually from testing and then an updated was moved into testing)
> Now as I understand the above text, it should get upgraded, right?
> 
> But I'd calculate the priorities (as described a bit above in the manpage) as following:
> stable    1.00 => 990 (this version is not installed and blongs to the target release)
> testing   2.01 => 500 (not installed and belongs not to the target release)
> installed 2.00 => 100 (installed)
> 
> So 1.00 has the highest prio, but according to the manpage, versions with prio <1000 are
> not downgraded. So I'd say nothing should happen.

It should upgrade to 2.01, as the quoted documentation states:

  Sometimes the installed version of a package (2.00)
  is more recent than the version belonging to the
  target release (1.00 - true), but not as recent as
  a version belonging to some other distribution (2.01,
  true as well). Such a package will indeed be
  upgraded (2.00 => 2.01) when apt-get install
  some-package or apt-get upgrade is executed, because
  at least one of the available versions (2.01) has a higher
  priority than the installed version (500 [2.01] > 100 [2.00]).

Thus the documentation states exactly what will be done. We could also
say something like:

the candidate version is the version with the highest pin greater than
1000, or alternatively, of all versions greater than the installed one
and with a pin larger than that given for the status file (100), the
version with the maximum pin. In any case, if two versions have equal
pin priority, the one with the greatest version number is chosen.


-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.





Reply to: