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

Bug#852967: release-notes: Document apt pinning changes



Package: release-notes
Severity: normal

In apt 1.1, we introduced a new pinning engine. The old one assigned one
pin priority per package, the new assigns pin priorities per version and
then picks the version with the highest pin that is (not a downgrade||has
a pin > 1000).

I think it is reasonable to mention this as this changes the effect of 
some pins, especially negative ones: Previously, pinning a version to -1 
effectively prevented the package from being installed (the package pin 
was -1), it now only prevents the version from being installed.

For example given icedove 1:45.6.0-2 and 1:45.6.0-3, pinning the latter version
to -1 with:

Package: icedove
Pin: version 1:45.6.0-3
Pin-Priority: -1

changed like that:
<<EOF
$ LD_LIBRARY_PATH=/var/lib/schroot/chroots/jessie-amd64/usr/lib/x86_64-linux-gnu/ /var/lib/schroot/chroots/jessie-amd64/usr/bin/apt-cache policy icedove
icedove:
  Installed: (none)
  Candidate: (none)
  Package pin: 1:45.6.0-3
  Version table:
     1:45.6.0-3 -1
        100 http://deb.debian.org/debian/ experimental/main amd64 Packages
     1:45.6.0-2 -1
        900 http://deb.debian.org/debian/ unstable/main amd64 Packages
        500 http://deb.debian.org/debian/ testing/main amd64 Packages
jak@jak-x230:~/Projects/Debian/apt:master$ apt-cache policy icedove                             
icedove:
  Installed: (none)
  Candidate: 1:45.6.0-2
  Version table:
     1:45.6.0-3 -1
        100 http://deb.debian.org/debian experimental/main amd64 Packages
        100 http://deb.debian.org/debian experimental/main i386 Packages
     1:45.6.0-2 900
        900 http://deb.debian.org/debian unstable/main amd64 Packages
        500 http://deb.debian.org/debian testing/main amd64 Packages
EOF

-> There is a candidate now, as you'd expect it to. Also note that the output
   now shows proper per-version pin values, and the Package Pin field is gone.

There may be some other subtle changes in some more corner cases.

But the implementation now matches the description in the manual page 
and thus does what people expect from it, so that is a huge step 
forward. I don't have any detailed wording ready, but I hope the 
information is sufficient.

PS. apt does not really require InRelease files as 5.3.2.2 says (it's only
    the spec in the wiki that says it's required).

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'unstable-debug'), (500, 'buildd-unstable'), (500, 'testing'), (100, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

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


Reply to: