Ticket #1001 (closed defect: invalid)

Opened 12 years ago

Last modified 12 years ago

Bcfg2 pkg verify fails if /etc/apt/preferences contains blank lines or just comments

Reported by: Owned by: desai
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:


Failed to instantiate tool Bcfg2.Client.Tools.APT.APT Traceback (most recent call last):

File "/usr/lib/pymodules/python2.6/Bcfg2/Client/", line 98, in init, setup, config))

File "/usr/lib/pymodules/python2.6/Bcfg2/Client/Tools/", line 68, in init

self.pkg_cache = apt.cache.Cache()

File "/usr/lib/python2.6/dist-packages/apt/", line 88, in init

File "/usr/lib/python2.6/dist-packages/apt/", line 126, in open

self._cache = apt_pkg.Cache(progress)

SystemError?: E:Unable to parse package file /etc/apt/preferences (1)


Change History

comment:1 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to invalid

This is a bug in python-apt and should probably be reported in either Ubuntu or Debian depending on which distro you're using in order to get it fixed.

comment:2 Changed 12 years ago by solj

f1cf457edb2a9552adf82d72541af69487f897f4 at least makes an attempt to handle the error from the Bcfg2 perspective, but it'd be a good idea to get this fixed upstream as well.

comment:3 Changed 12 years ago by

Hi sol,

thanks for looking into this. It turns out that there was a syntax error in the preferences file so my bad. However, the handling of the error would be a nice addition.

Thanks =]

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.