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

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



Control: tag -1 pending

On Wed, Sep 13, 2006 at 01:25:31AM +0200, carlo@alinoe.com wrote:
> Package: apt
> Version: 0.6.45
> 
> Using the following /etc/apt/sources.list file:
> 
> deb http://ftp.nluug.nl/pub/os/Linux/distr/debian/ etch main contrib non-free
> deb-src http://ftp.nluug.nl/pub/os/Linux/distr/debian/ etch main contrib non-free
> deb http://security.debian.org/ etch/updates main
> deb-src http://security.debian.org/ etch/updates main
> 
> And the following /etc/apt/apt.conf file:
> 
> APT::Authentication::TrustCDROM "true";
> Acquire::http::Proxy "false";
> 
> And no /etc/apt/preferences file, the following commands result
> (correctly) in:
> 
> $ apt-cache policy linux-kernel-headers
> linux-kernel-headers:
>   Installed: 2.6.17.6-1
>   Candidate: 2.6.17.10-3
>   Version table:
>      2.6.17.10-3 0
>         500 http://ftp.nluug.nl etch/main Packages
>  *** 2.6.17.6-1 0
>         100 /var/lib/dpkg/status
> 
> $ 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)
> 
> 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.
> 
> Using,
> 
> Package: linux-kernel-headers
> Pin: origin ftp.nluug.nl
> Pin-Priority: 50
> 
> gives, by the way, the following with apt-cache policy:
> 
> 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!
> 
> As a side note, I really don't understand why
> the Pin-Priority of '50' is shown on two lines
> behind the versions 2.6.17.10-3 and 2.6.17.6-1:
> If we use the previous /etc/apt/preferences:
> 
> Package: linux-kernel-headers
> Pin: version 2.6.17.10-3
> Pin-Priority: 50
> 
> where the priority ONLY refers to version 2.6.17.10-3,
> we STILL get:
> 
> $ 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
> 
> where the '500' still causes the install, I assume.
> Now the '50' is still printed after both versions...
> Imho, this output should be:
> 
> 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 http://ftp.nluug.nl etch/main Packages
>  *** 2.6.17.6-1
>         100 /var/lib/dpkg/status
> 
> - 

This should be fixed in current git, and the next
experimental upload.

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