Ticket #1001 (closed defect: invalid)
Bcfg2 pkg verify fails if /etc/apt/preferences contains blank lines or just comments
Reported by: | https://www.google.com/accounts/o8/id?id=AItOawkfar6gGD3PuUixQdEZQyRr2mpowLW1A70 | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
Failed to instantiate tool Bcfg2.Client.Tools.APT.APT Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/Bcfg2/Client/Frame.py", line 98, in init
self.tools.append(tool(self.logger, setup, config))
File "/usr/lib/pymodules/python2.6/Bcfg2/Client/Tools/APT.py", line 68, in init
self.pkg_cache = apt.cache.Cache()
File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 88, in init
self.open(progress)
File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 126, in open
self._cache = apt_pkg.Cache(progress)
SystemError?: E:Unable to parse package file /etc/apt/preferences (1)
Attachments
Change History
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 https://www.google.com/accounts/o8/id?id=AItOawkfar6gGD3PuUixQdEZQyRr2mpowLW1A70
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 =]
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.