[Bug 1208820] Re: Pinning preferences do not override eachother as expected
David Kalnischkies
1208820 at bugs.launchpad.net
Tue Aug 6 12:45:29 UTC 2013
The apt_preferences manpage says:
1) Note that this [referring to the target release] has precedence over any general priority you set in the /etc/apt/preferences file described later, but not over specifically pinned packages.
2) If any specific-form records match an available package version then the first such record determines the priority of the package version. Failing that, if any general-form records match an available package version then the first such record determines the priority of the package version. [earlier in the manpage is said in which order the records are parsed]
So this is documented behavior and is not going to change as people are
(rightfully) depending on it – as depending on a manpage is way better
than the "i expect it to work that way" as advanced stuff usually isn't
(or at least not for all, as expectations are different for everyone).
In short: Pinning is a highly advanced feature, so reading the manpage
is HIGHLY recommend. Failing to do so is usually equivalent to
destroying your system with a (virtual) sledgehammer.
** Changed in: apt (Ubuntu)
Status: New => Opinion
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1208820
Title:
Pinning preferences do not override eachother as expected
Status in “apt” package in Ubuntu:
Opinion
Bug description:
When some pinning rules are added in /etc/apt/preferences.d/ the
priority values of the rules that matches first are used.
Take this example:
Package: *
Pin: release n=raring
Pin-Priority: 990
Package: *
Pin: release o=LP-PPA-my-raring-ppa
Pin-Priority: 50
Results in all packages of my-raring-ppa to have a priority of 990.
(This can be 'fixed' by reverting these two sets of pinning rules)
Furthermore, if
APT::Default-Release "raring";
is used (default in /etc/apt/apt/config.d/01ubuntu), all raring
packages have a priority of 990 and
Package: *
Pin: release o=LP-PPA-my-raring-ppa
Pin-Priority: 50
is not working anymore to set/lower the priority of the my-raring-ppa
packages to 50.
The latter is quite a problem, as this prevents pinning from working properly (IMO).
I do not know whether there are two problems
1) APT::Default-Release is precessed after the preferences
2) Order of pinning rules is reverse-chronological
, or that both problems have the same origin.
$ apt-cache policy apt
apt:
Installed: 0.9.7.7ubuntu4
Candidate: 0.9.7.7ubuntu4
Version table:
0.9.9.1~ubuntu2 0
50 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
*** 0.9.7.7ubuntu4 0
990 http://nl.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
100 /var/lib/dpkg/status
$ lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1208820/+subscriptions
More information about the foundations-bugs
mailing list