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

Bug#218876: marked as done (Ugrading apt 0.5.4 (stable) to 0.5.14 (testing) results in ignoring pin priorities in /etc/apt/preferences)



Your message dated Mon, 3 Nov 2003 11:23:05 -0500
with message-id <20031103162305.GH9377@dijkstra.csh.rit.edu>
and subject line Bug#218876: Ugrading apt 0.5.4 (stable) to 0.5.14 (testing) results in ignoring pin priorities in /etc/apt/preferences
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 3 Nov 2003 06:46:20 +0000
>From vesok@yahoo.com Mon Nov 03 00:46:19 2003
Return-path: <vesok@yahoo.com>
Received: from web60001.mail.yahoo.com [216.109.116.224] 
	by master.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1AGYTj-0004Gk-00; Mon, 03 Nov 2003 00:46:19 -0600
Message-ID: <20031103064618.40948.qmail@web60001.mail.yahoo.com>
Received: from [203.166.107.242] by web60001.mail.yahoo.com via HTTP; Mon, 03 Nov 2003 17:46:18 EST
Date: Mon, 3 Nov 2003 17:46:18 +1100 (EST)
From: =?iso-8859-1?q?Vesselin=20Kostadinov?= <vesok@yahoo.com>
Reply-To: vesok@yahoo.com
Subject: Ugrading apt 0.5.4 (stable) to 0.5.14 (testing) results in ignoring pin priorities in /etc/apt/preferences
To: submit@bugs.debian.org
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-6.9 required=4.0
	tests=BAYES_60,HAS_PACKAGE,PATCH_UNIFIED_DIFF
	autolearn=ham version=2.53-bugs.debian.org_2003_11_1
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_1 (1.174.2.15-2003-03-30-exp)

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.

---------------------------------------
Received: (at 218876-done) by bugs.debian.org; 3 Nov 2003 16:23:14 +0000
>From mdz@csh.rit.edu Mon Nov 03 10:23:11 2003
Return-path: <mdz@csh.rit.edu>
Received: from blacksheep.csh.rit.edu [129.21.60.6] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AGhTx-0001h0-00; Mon, 03 Nov 2003 10:23:09 -0600
Received: from dijkstra (dijkstra.csh.rit.edu [129.21.60.152])
	by blacksheep.csh.rit.edu (Postfix) with ESMTP
	id 8D53C180; Mon,  3 Nov 2003 11:23:05 -0500 (EST)
Received: from mdz by dijkstra with local (Exim 3.35 #1 (Debian))
	id 1AGhTt-0004AC-00; Mon, 03 Nov 2003 11:23:05 -0500
Date: Mon, 3 Nov 2003 11:23:05 -0500
From: Matt Zimmerman <mdz@debian.org>
To: vesok@yahoo.com, 218876-done@bugs.debian.org
Subject: Re: Bug#218876: Ugrading apt 0.5.4 (stable) to 0.5.14 (testing) results in ignoring pin priorities in /etc/apt/preferences
Message-ID: <20031103162305.GH9377@dijkstra.csh.rit.edu>
References: <20031103064618.40948.qmail@web60001.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20031103064618.40948.qmail@web60001.mail.yahoo.com>
User-Agent: Mutt/1.3.28i
Sender: Matt Zimmerman <mdz@csh.rit.edu>
Delivered-To: 218876-done@bugs.debian.org
X-Spam-Status: No, hits=-6.7 required=4.0
	tests=BAYES_20,EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT
	version=2.53-bugs.debian.org_2003_11_1
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_1 (1.174.2.15-2003-03-30-exp)

On Mon, Nov 03, 2003 at 05:46:18PM +1100, Vesselin Kostadinov wrote:

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

There was no format change; the name has always been Pin-Priority.  It's
just that apt previously didn't warn if you didn't specify Pin-Priority, and
unknown fields are silently ignored.

-- 
 - mdz



Reply to: