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

Bug#387218: apt-get install does upgrade for Priority -1 package.



tag 387218 confirmed
thanks

On Wed, Sep 13, 2006 at 01:25:31AM +0200, carlo@alinoe.com wrote:
> When next an /etc/apt/preferences file is created
> with the following contents:
> 
> Package: linux-kernel-headers
> Pin: version 2.6.17.10-3
> Pin-Priority: 50
> 
> One would expect to NOT see an upgrade, as this would set
> the priority of the Candidate to very low. However, the
> result of using this preferences file is:
> 
> $ apt-get --dry-run install linux-kernel-headers
> Reading package lists... Done
> Building dependency tree... Done
> The following packages will be upgraded:
>   linux-kernel-headers
> 1 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.
> Inst linux-kernel-headers [2.6.17.6-1] (2.6.17.10-3 Debian:testing)
> Conf linux-kernel-headers (2.6.17.10-3 Debian:testing)
> 
> Moreover, when - instead - using the following preferences file:
> 
> Package: linux-kernel-headers
> Pin: origin ftp.nluug.nl
> Pin-Priority: 50
> 
> The result is STILL that it gets installed!
> 
> $ apt-get --dry-run install linux-kernel-headers
> Reading package lists... Done
> Building dependency tree... Done
> The following packages will be upgraded:
>   linux-kernel-headers
> 1 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.
> Inst linux-kernel-headers [2.6.17.6-1] (2.6.17.10-3 Debian:testing)
> Conf linux-kernel-headers (2.6.17.10-3 Debian:testing)
> 
> This has to be a bug, because next when we only change the Package line
> to refer to all packages instead of just linux-kernel-headers, thus:
> 
> Package: *
> Pin: origin ftp.nluug.nl
> Pin-Priority: 50
> 
> The result is finally:
> 
> $ apt-get --dry-run install linux-kernel-headers
> Reading package lists... Done
> Building dependency tree... Done
> linux-kernel-headers is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 
> and
> 
> $ apt-cache policy linux-kernel-headers
> linux-kernel-headers:
>   Installed: 2.6.17.6-1
>   Candidate: 2.6.17.6-1
>   Version table:
>      2.6.17.10-3 0
>          50 http://ftp.nluug.nl etch/main Packages
>  *** 2.6.17.6-1 0
>         100 /var/lib/dpkg/status
> 
> The latter can be understood since 50 < 100.

 
> apt-cache policy linux-kernel-headers
> linux-kernel-headers:
>   Installed: 2.6.17.6-1
>   Candidate: 2.6.17.10-3
>   Package pin: 2.6.17.10-3
>   Version table:
>      2.6.17.10-3 50
>         500 http://ftp.nluug.nl etch/main Packages
>  *** 2.6.17.6-1 50
>         100 /var/lib/dpkg/status
> 
> Why is there still a '500' there now?
> Doesn't the 500 refer to version 2.6.17.10-3 (of
> package linux-kernel-headers!)? That 500 is both,
> on the line of origin http://ftp.nluug.nl, and
> below (indented) of version 2.6.17.10-3, and thus
> package linux-kernel-headers. The priority should
> be 50!

So it seems that pinning per-package is a bit broken. Below you can see
two tries. The lists priority overrides the package priority somehow.

jak@hp:~/Desktop/apt/jak$ cat prefs 
Package: apt
Pin: release o=Debian
Pin-Priority: 50
jak@hp:~/Desktop/apt/jak$ LC_ALL=C apt-cache -oDir::Etc::Preferences=$PWD/prefs  policy apt
apt:
  Installed: 0.7.25.3
  Candidate: 0.7.26~exp2
  Package pin: 0.7.26~exp2
  Version table:
     0.7.26~exp2 50
        500 http://localhost/debian/ experimental/main Packages
 *** 0.7.25.3 50
        100 /var/lib/dpkg/status
jak@hp:~/Desktop/apt/jak$ cat prefs 
Package: *
Pin: release o=Debian
Pin-Priority: 50
jak@hp:~/Desktop/apt/jak$ LC_ALL=C apt-cache -oDir::Etc::Preferences=$PWD/prefs  policy apt
apt:
  Installed: 0.7.25.3
  Candidate: 0.7.25.3
  Version table:
     0.7.26~exp2 0
         50 http://localhost/debian/ experimental/main Packages
 *** 0.7.25.3 0
        100 /var/lib/dpkg/status



-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

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

Attachment: pgp4nZeBmLU05.pgp
Description: PGP signature


Reply to: