I'm attempting to do the equivalent of holding a package via
/etc/apt/preferences.d/something.pref in 16.04, and the behaviour seems to have changed from 14.04.
Given some package
foo that has an installed version like 126.96.36.199~trusty, in 14.04, the following stanza will prevent
apt-get upgrade from upgrading
Package: foo Pin: version 1 Pin-Priority: 501
You'll note that
version 1 does not in fact match anything close the the actual package version.
The same stanza, in 16.04, does not appear to have any effect. Is there a way to do this? I'm aware of
apt-mark hold foo, but for various internal reasons that's not as good a solution if using a pin is possible.
The only difference I observe is that when running
apt-cache policy foo, on 14.04 I see output that starts like this:
foo: Installed: 188.8.131.52-2~trusty Candidate: 184.108.40.206-2~trusty Package pin: (not found)
But on 16.04 the
Package pin: (not found) is not present.
Running a bare
apt-cache policy also includes lines like the following on 14.04
Pinned packages: foo -> (not found)
while on 16.04 the
Pinned packages: section is entirely empty.