← Back to team overview

apport-hackers team mailing list archive

[Merge] lp:~brian-murray/apport/bug-1097773 into lp:apport

 

Brian Murray has proposed merging lp:~brian-murray/apport/bug-1097773 into lp:apport.

Requested reviews:
  Apport upstream developers (apport-hackers)
Related bugs:
  Bug #1097773 in apport (Ubuntu): "apport-gtk crashed with ValueError in _apt_pkg(): package skype-bin does not exist"
  https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1097773

For more details, see:
https://code.launchpad.net/~brian-murray/apport/bug-1097773/+merge/180615

Evan had a branch fixing this but a merge proposal was not submitted, I'm just doing that for him.  This error is occurring rather regularly in 13.04 - https://errors.ubuntu.com/bucket/?id=/usr/share/apport/apport-gtk:ValueError:__getitem__:__getitem__:_apt_pkg:__getitem__:%3Clambda%3E:%3Clambda%3E:collect_info:exc_raise:run:thread_collect_info:add_package_info:get_source:_apt_pkg.  I'll SRU the fix if it is accepted.
-- 
https://code.launchpad.net/~brian-murray/apport/bug-1097773/+merge/180615
Your team Apport upstream developers is requested to review the proposed merge of lp:~brian-murray/apport/bug-1097773 into lp:apport.
=== modified file 'NEWS'
--- NEWS	2013-08-02 14:02:44 +0000
+++ NEWS	2013-08-16 16:41:53 +0000
@@ -9,6 +9,9 @@
    don't have Contents.gz).
  * Robustify "progress bar visible" GTK and KDE UI checks for the faster
    collection due to dropping lsb_release.
+ * apport/report.py: Gracefully handle being unable to get the source package
+   for a binary package, as when the latter does not exist in the cache.
+   (LP: #1097773)
 
 2.12 (2013-08-02)
 -----------------

=== modified file 'apport/report.py'
--- apport/report.py	2013-08-02 09:08:44 +0000
+++ apport/report.py	2013-08-16 16:41:53 +0000
@@ -289,7 +289,12 @@
         self['Package'] = '%s %s%s' % (package, version or '(not installed)',
                                        self._customized_package_suffix(package))
         if version or 'SourcePackage' not in self:
-            self['SourcePackage'] = packaging.get_source(package)
+            try:
+                self['SourcePackage'] = packaging.get_source(package)
+            except ValueError:
+                # The package may not exist in the cache, as is the case with
+                # skype-bin.
+                pass
         if not version:
             return
 


Follow ups