Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Bug#345057: aptitude does not parse whitespace in /etc/apt/preferences correctly

瀏覽次數:9 次
跳到第一則未讀訊息

Hugo Graumann

未讀,
2005年12月28日 下午1:40:112005/12/28
收件者:
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 debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Daniel Burrows

未讀,
2006年1月2日 下午1:40:152006/1/2
收件者:
 This is just due to the fact that aptitude loads the preferences file
in "update" and apt-get doesn't. I suppose this could be avoided by not
initializing as many structures in "update".

Daniel

signature.asc
0 則新訊息