[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Synaptic-devel] [BUG] Commented out "empty" preferences file trigg
From: |
Panu Matilainen |
Subject: |
Re: [Synaptic-devel] [BUG] Commented out "empty" preferences file triggers bug ? |
Date: |
05 May 2003 21:26:27 +0300 |
On Mon, 2003-05-05 at 20:53, Dag Wieers wrote:
> On 5 May 2003, Panu Matilainen wrote:
>
> > On Sun, 2003-05-04 at 03:47, Dag Wieers wrote:
> > > Ok, I've seem to have send this mail with a faulty subject (I copied a
> > > former mail and forgot to change the subject). So here is it again. Sorry.
> > >
> > > Hi,
> > >
> > > I've found another problem after I had some experiments with pinning.
> > > Although I don't have any active pins set (everything is commented out)
> > > synaptic gives the following error on start-up and after that doesn't
> > > show
> > > any packages:
> > >
> > > Invalid record in the preferences file, no Package header
> > > could not open package priority file /etc/apt/rpmpriorities
> > >
> > > My /etc/apt/preferences looked like this:
> > >
> > > #Explanation: Prioritize Red Hat updates
> > > #Package: *
> > > #Pin: release c=updates
> > > #Pin-Priority: 1002
> > > #
> > > #Explanation: Prioritize Red Hat packages
> > > #Package: *
> > > #Pin: release c=os
> > > #Pin-Priority: 1001
> > > #
> > > #Explanation: Prioritize FreshRPMS packages
> > > #Package: *
> > > #Pin: vendor "Freshrpms.net"
> > > #Pin-Priority: +550
> > > #
> > > #Explanation: Prioritize Dag Wieers packages
> > > #Package: *
> > > #Pin: packager "Dag Wieers <address@hidden>"
> > > #Pin-Priority: +500
> > >
> > > Apt however doesn't have a problem with this preferences file.
> >
> > Hmm.. actually apt does have a problem with it and the error you see on
> > synaptic startup is comping from libapt, not synaptic itself:
> > address@hidden root]# apt-cache policy
> > E: Invalid record in the preferences file, no Package header
> >
> > If you have any contents in the file, even just comments, you need to
> > have one "Package: <something>" line in the preferences file, otherwise
> > apt + synaptic considers the file invalid. A bit odd, yes...
>
> But apt itself doesn't consider it an invalid file.
Mine certainly does (apt-0.5.5cnc5):
address@hidden root]# cat /dev/null > /etc/apt/preferences
address@hidden root]# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 0 removed and 0 not upgraded.
address@hidden root]# echo "# just a comment" > /etc/apt/preferences
address@hidden root]# apt-get upgrade
Reading Package Lists... Done
E: Invalid record in the preferences file, no Package header
address@hidden root]# echo "Package: *" >> /etc/apt/preferences
address@hidden root]# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
0 packages upgraded, 0 newly installed, 0 removed and 0 not upgraded.
> Should I consider filing a bugreport on the apt-mailinglist ? Tell me what I
> should do ? ;)
Consider it a bug if you wish, or a peculiar file format :) To change
the behavior will require changing both synaptic and apt anyway.
- Panu -