Package: aptitude
Version: 0.2.15.9-2

I am running Debian stable.

When the /etc/apt/preferences file has comments added to it
in certain patterns, the command "aptitude update" can fail.

If the preferences file contains the following contents:
#    some comment
#
# Sid
Package: *
Pin: release a=unstable
Pin-priority: 80
Then "aptitude update" works normally and gives the output
Reading Package Lists... Done
Building Dependency Tree       
Reading extended state information       
Initializing package states... Done
Hit http://ftp.debian.org stable/main Packages
Hit http://ftp.debian.org stable/main Release
Reading Package Lists... Done      
Building Dependency Tree       
Reading extended state information       
Initializing package states... Done

On the other hand, if the preferences file contains the following contents:
#    some comment

# Sid
Package: *
Pin: release a=unstable
Pin-priority: 80
Then "aptitude update" fails and gives the output
Reading Package Lists... Done
E: Invalid record in the preferences file, no Package header

Blank lines in /etc/apt/prefences do not always generate this error,
but the above pattern seems to be the simplest reproducible case
that forces out the problem.

I came across the problem when I was trying to nicely comment
the /etc/apt/preferences file.

The command "apt-get update" works normally for both cases.

As far as I can tell, the bug remains, regardless of the contents
of the /etc/apt/sources.list file.

Salutations,
Hugo Graumann


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to