Bug#825113: apt: APT's specific preference affects all available versions
On Mon, May 23, 2016 at 06:49:42PM +0000, Alexander Tsamutali wrote:
> Package: apt
> Version: 1.0.9.8.3
> Severity: normal
>
>
> root@ed69a0989664:/etc/apt# apt-cache policy
> Package files:
> 100 /var/lib/dpkg/status
> release a=now
> 500 http://security.debian.org/ jessie/updates/main amd64 Packages
> release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=main
> origin security.debian.org
> 500 http://httpredir.debian.org/debian/ jessie-updates/main amd64 Packages
> release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=main
> origin httpredir.debian.org
> 500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
> release v=8.4,o=Debian,a=stable,n=jessie,l=Debian,c=main
> origin httpredir.debian.org
> Pinned packages:
> root@ed69a0989664:/etc/apt# apt-cache policy xscreensaver
> xscreensaver:
> Installed: (none)
> Candidate: 5.30-1+deb8u2
> Version table:
> 5.30-1+deb8u2 0
> 500 http://httpredir.debian.org/debian/ jessie-updates/main amd64 Packages
> 5.30-1+deb8u1 0
> 500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
> 500 http://security.debian.org/ jessie/updates/main amd64 Packages
> root@ed69a0989664:/etc/apt# apt-get install -s xscreensaver > /dev/null ; echo $?
> 0
> root@ed69a0989664:/etc/apt# mv preferences.d/xscreensaver.disabled preferences.d/xscreensaver
> root@ed69a0989664:/etc/apt# cat preferences.d/xscreensaver
> Package: xscreensaver
> Pin: origin n=jessie-updates
> Pin-Priority: -1
Like Adam wrote, that's not a valid pin.
> root@ed69a0989664:/etc/apt# apt-cache policy
> Package files:
> 100 /var/lib/dpkg/status
> release a=now
> 500 http://security.debian.org/ jessie/updates/main amd64 Packages
> release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=main
> origin security.debian.org
> 500 http://httpredir.debian.org/debian/ jessie-updates/main amd64 Packages
> release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=main
> origin httpredir.debian.org
> 500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
> release v=8.4,o=Debian,a=stable,n=jessie,l=Debian,c=main
> origin httpredir.debian.org
> Pinned packages:
> xscreensaver -> (not found)
> root@ed69a0989664:/etc/apt# apt-cache policy xscreensaver
> xscreensaver:
> Installed: (none)
> Candidate: (none)
> Package pin: (not found)
> Version table:
> 5.30-1+deb8u2 -1
> 500 http://httpredir.debian.org/debian/ jessie-updates/main amd64 Packages
> 5.30-1+deb8u1 -1
> 500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
> 500 http://security.debian.org/ jessie/updates/main amd64 Packages
> root@ed69a0989664:/etc/apt# apt-get install -s xscreensaver > /dev/null ; echo $?
> E: Package 'xscreensaver' has no installation candidate
> 100
The pin does not match anything, and in the old engine, a specific pin
must match something, otherwise there will be no candidate. In the current
engine (1.1 and newer), it's much better.
>
>
> This was mentioned in [1] as 'a possible display bug in "apt-cache
> policy"', but is seems like it affects not only output but general
> operation of apt.
Nope.
--
Debian Developer - deb.li/jak | jak-linux.org - free software dev
When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to (`inline'). Thank you.
Reply to: