Main windows fails with "SystemError" if malformed line in sources.list

Bug #63019 reported by Matti Lindell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

update-manager fails to show its dialog when /etc/apt/sources.list contains malformed line:

$ update-manager
/usr/lib/python2.4/site-packages/apt/__init__.py:17: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
Introspect error: The name org.freedesktop.UpdateManager was not provided by any .service files
no listening object (The name org.freedesktop.UpdateManager was not provided by any .service files)
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 89, in ?
    app.main(options)
  File "/usr/lib/python2.4/site-packages/UpdateManager/UpdateManager.py", line 948, in main
    self.fillstore()
  File "/usr/lib/python2.4/site-packages/UpdateManager/UpdateManager.py", line 800, in fillstore
    self.initCache()
  File "/usr/lib/python2.4/site-packages/UpdateManager/UpdateManager.py", line 886, in initCache
    self.cache = MyCache(progress)
  File "/usr/lib/python2.4/site-packages/UpdateManager/UpdateManager.py", line 87, in __init__
    apt.Cache.__init__(self, progress)
  File "/usr/lib/python2.4/site-packages/apt/cache.py", line 36, in __init__
    self.open(progress)
  File "/usr/lib/python2.4/site-packages/apt/cache.py", line 53, in open
    self._cache = apt_pkg.GetCache(progress)
SystemError: E:Malformed line 53 in source list /etc/apt/sources.list (dist parse), E:The list of sources could not be read.

aptitude says
$ sudo aptitude update
Password:
E: Malformed line 53 in source list /etc/apt/sources.list (dist parse)
E: Malformed line 53 in source list /etc/apt/sources.list (dist parse)
E: The list of sources could not be read.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Could you please attach your /etc/apt/source.list?

Are you using Dapper or Edgy?

Revision history for this message
Matti Lindell (mlind) wrote :

Sorry, forgot..
Edgy
update-manager 0.44.13

You can reproduce this bug if you put:
deb http://archive.ubuntu.com/ubuntu foo

to your /etc/apt/sources.list

Revision history for this message
John Vivirito (gnomefreak) wrote :

Can you please attach your /etc/apt/sources.list and /var/log/update-manager files using the "attach files" in upper left side of this screen. Thank you for reporting this bug.

Revision history for this message
Matti Lindell (mlind) wrote :

Okay. There was no /var/log/update-manager though.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I changed this for now to include a better error reporting. It should probably try to repair broken sources.list automatically for edgy+1.

Cheers,
 Michael

Changed in update-manager:
importance: Undecided → Medium
status: Unconfirmed → Fix Committed
Revision history for this message
John Vivirito (gnomefreak) wrote :

Thank you Michael ;)

Michael Vogt (mvo)
Changed in update-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.