** Summary changed:

- improve handling of broken sources.list files
+ Poor handling of broken sources.list files

** Description changed:

- When there is a syntax error in an apt sources.list file a dialog is 
displayed with something along these lines:
- """
+ Ubuntu Software Center 2.1.16.1, Ubuntu Maverick
+ Ubuntu Software Center 5.1.11, Ubuntu 12.04 beta 1
+ 
+ 1. echo "deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu main #Ubuntu Tweak 
Stable Source" | sudo tee /etc/apt/sources.list.d/ubuntu-tweak-stable.list
+ 2. software-center
+ 3. update-manager
+ 
+ What happens:
+ 2. ----------
+ Traceback (most recent call last):
+   File 
"/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 
222, in open
+     self._cache = apt.Cache(GtkMainIterationProgress())
+   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 102, in __init__
+     self.open(progress)
+   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 145, in open
+     self._cache = apt_pkg.Cache(progress)
+ SystemError: E:Malformed line 1 in source list 
/etc/apt/sources.list.d/ubuntu-tweak-stable.list (dist parse), E:The list of 
sources could not be read., E:The package lists or status file could not be 
parsed or opened.
+ 2012-03-12 10:52:15,573 - softwarecenter.db.enquire - ERROR - 
_get_estimate_nr_apps_and_nr_pkgs failed
+ Traceback (most recent call last):
+   File "/usr/share/software-center/softwarecenter/db/enquire.py", line 115, 
in _get_estimate_nr_apps_and_nr_pkgs
+     tmp_matches = enquire.get_mset(0, len(self.db), None, xfilter)
+   File "/usr/share/software-center/softwarecenter/db/appfilter.py", line 74, 
in __call__
+     if (not pkgname in self.cache and
+   File 
"/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 
241, in __contains__
+     return self._cache.__contains__(k)
+ AttributeError: 'NoneType' object has no attribute '__contains__'
+ Traceback (most recent call last):
+   File "/usr/bin/software-center", line 176, in <module>
+     app.run(args)
+   File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1279, 
in run
+     self.show_available_packages(args)
+   File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1208, 
in show_available_packages
+     self.view_manager.set_active_view(ViewPages.AVAILABLE)
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", 
line 148, in set_active_view
+     view_widget.init_view()
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", 
line 157, in init_view
+     self.apps_filter)
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 
234, in __init__
+     self.build(desktopdir)
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 
476, in build
+     self._build_homepage_view()
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 
253, in _build_homepage_view
+     self._append_whats_new()
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 
415, in _append_whats_new
+     whats_new_cat = self._update_whats_new_content()
+   File 
"/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 
404, in _update_whats_new_content
+     docs = whats_new_cat.get_documents(self.db)
+   File "/usr/share/software-center/softwarecenter/db/categories.py", line 
120, in get_documents
+     nonblocking_load=False)
+   File "/usr/share/software-center/softwarecenter/db/enquire.py", line 316, 
in set_query
+     self._blocking_perform_search()
+   File "/usr/share/software-center/softwarecenter/db/enquire.py", line 211, 
in _blocking_perform_search
+     matches = enquire.get_mset(0, self.limit, None, xfilter)
+   File "/usr/share/software-center/softwarecenter/db/appfilter.py", line 74, 
in __call__
+     if (not pkgname in self.cache and
+   File 
"/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 
241, in __contains__
+     return self._cache.__contains__(k)
+ AttributeError: 'NoneType' object has no attribute '__contains__'
+ ------------
+ 
+ 3. A dialog is displayed with something along these lines:
+ ------------
  Could not initialize the package information
  An unresolvable problem occurred while initializing the package information.
  Please report this bug against the 'update-manager' package and include the 
following error message:
  'E:Type 't/screenlets/ppa/ubuntu' is not known on line 3 in source list 
/etc/apt/sources.list.d/screenlets-ppa-oneiric.list'
- """
+ ------------
+ And an obese menu appears in the corner of the screen. 
<http://imgur.com/a/pgGEf#2>
  
- This is usually a user error and shouldn't be reported as a bug. update-
- manager should handle this situation better and showing a clear message
- about how to fix that situation instead.
  
- ProblemType: Bug
- DistroRelease: Ubuntu 12.04
- Package: update-manager 1:0.154
- ProcVersionSignature: Ubuntu 3.1.0-2.3-generic 3.1.0
- Uname: Linux 3.1.0-2-generic x86_64
- ApportVersion: 1.25-0ubuntu1
- Architecture: amd64
- Date: Fri Nov  4 14:10:13 2011
- EcryptfsInUse: Yes
- InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
- PackageArchitecture: all
- ProcEnviron:
-  PATH=(custom, user)
-  LANG=en_US.utf8
-  SHELL=/bin/bash
- SourcePackage: update-manager
- UpgradeStatus: No upgrade log present (probably fresh install)
+ Besides the duplicates marked here, there are dozens of bug reports with 
particular examples of malformed sources.list, such as bug 128775, bug 163933, 
bug 164135, bug 176253, bug 183861, bug 241154, bug 311399, bug 350373, bug 
358587, bug 416872, bug 432318, bug 470589, bug 617232, bug 617998, bug 677698, 
bug 728258, bug 753253, bug 799600, bug 830588, bug 835258, bug 879221, bug 
880661, bug 886641, bug 890138, bug 927987, bug 947296, bug 981357, bug 
1008359, bug 1009618, and bug 1063099.
+ 
+ Often these bug reports are marked as Incomplete or Invalid, or
+ converted into questions, on the grounds that the user must have edited
+ sources.list themselves. But Ubuntu should be robust enough to repair
+ problems like this itself.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/886273

Title:
  Poor handling of broken sources.list files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/886273/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to