Bug#869921: apt: Pinning the local version of a package no longer works

2017-07-27 Thread Julian Andres Klode
On Thu, Jul 27, 2017 at 11:44:31AM -0400, Frédéric Brière wrote:
> Package: apt
> Version: 1.1
> Severity: normal
> 
> Pinning the local version of a package, as documented in
> apt_preferences(5), seems to have been broken between jessie and
> stretch:
> 
>   Contents of /etc/apt/preferences:
> 
> Package: hello
> Pin: origin ""
> Pin-Priority: 999

What do you mean with local version? Your examples are installed
versions, which are pinned with release a=now, compare the output
of apt-cache policy.

> 
>   Output of "apt-cache policy hello" on jessie:
> 
> hello:
>   Installed: 2.8-1
>   Candidate: 2.8-1
>   Package pin: (not found)
>   Version table:
>  2.9-2+deb8u1 999
> 500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
>  *** 2.8-1 999
> 100 /var/lib/dpkg/status

No, it explicitly says it does not find the package pin, so that's not 
working there either. There seems to be a bug somewhere that causes it
to pick 2.8-1 then, and that's fixed in stretch.

> 
>   Output of "apt-cache policy hello" on stretch:
> 
> hello:
>   Installed: 2.8-1
>   Candidate: 2.10-1+b1
>   Version table:
>  2.10-1+b1 500
> 500 http://httpredir.debian.org/debian stretch/main amd64 Packages
>  *** 2.8-1 100
> 100 /var/lib/dpkg/status

Yay, everything working. So I guess the question is more if /var/lib/dpkg/status
should match origin "" or not.

> 
> 
> The behavior of "apt-get upgrade" confirms this: the package is pinned
> to the local version on jessie, but is upgraded on stretch (and sid).
> 
> After bisecting a bit with snapshots, this was apparently introduced
> between 1.0.10.2 and 1.1.

Well, that's expected, and not really helpful, there are about 2 year
of changes between them.


-- 
Debian Developer - deb.li/jak | jak-linux.org - free software dev
  |  Ubuntu Core Developer |
When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to ('inline').  Thank you.



Bug#869921: apt: Pinning the local version of a package no longer works

2017-07-27 Thread Frédéric Brière
Package: apt
Version: 1.1
Severity: normal

Pinning the local version of a package, as documented in
apt_preferences(5), seems to have been broken between jessie and
stretch:

  Contents of /etc/apt/preferences:

Package: hello
Pin: origin ""
Pin-Priority: 999

  Output of "apt-cache policy hello" on jessie:

hello:
  Installed: 2.8-1
  Candidate: 2.8-1
  Package pin: (not found)
  Version table:
 2.9-2+deb8u1 999
500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
 *** 2.8-1 999
100 /var/lib/dpkg/status

  Output of "apt-cache policy hello" on stretch:

hello:
  Installed: 2.8-1
  Candidate: 2.10-1+b1
  Version table:
 2.10-1+b1 500
500 http://httpredir.debian.org/debian stretch/main amd64 Packages
 *** 2.8-1 100
100 /var/lib/dpkg/status


The behavior of "apt-get upgrade" confirms this: the package is pinned
to the local version on jessie, but is upgraded on stretch (and sid).

After bisecting a bit with snapshots, this was apparently introduced
between 1.0.10.2 and 1.1.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/3 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)