Bug#218876: Ugrading apt 0.5.4 (stable) to 0.5.14 (testing) results in ignoring pin priorities in /etc/apt/preferences
Package: apt
Version: 0.5.14
Severity: normal
The syntax of /etc/apt/preferences used "Priority: " tags while the syntax
in 0.5.14 is "Pin-Priority: ". After upgrading to 0.5.14 the
/etc/apt/preferences file remains the same but the new apt looks for
"Pin-Priority: ", does not find it and produces warning:
W: No priority (or zero) specified for pin
I guess a possible solution would be to update the postinst script to
upgrade /etc/apt/preferences file to the new format. However older
preferences files may come up from backups and produce the same warnings.
A more user friendly approach is to patch policy.cc:
--- policy.cc.orig 2003-11-02 23:08:39.000000000 +1030
+++ policy.cc 2003-11-02 23:11:27.000000000 +1030
@@ -294,7 +294,7 @@
for (; Word != End && isspace(*Word) != 0; Word++);
short int priority = Tags.FindI("Pin-Priority", 0);
- if (priority == 0)
+ if ((priority == 0) || ((priority = Tags.FindI("Priority")) == 0))
{
_error->Warning(_("No priority (or zero) specified for pin"));
continue;
With this patch apt will work either way, providing smooth transition from
the older format.
Note that apt-howto needs to be updated as well, unless the maintainer
decides to back-off the change and revert to the old "Priority: " tag.
=====
Yet Another Thawte Notary. For a free personal digital certificate visit www.thawte.com
The text below was appended by the mailbox service provider so I should not be held responsible for it. Vesselin.
http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.
Reply to: