Package: libmtp
Version: 1.1.10-1
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu wily ubuntu-patch

The hook doesn't import what it needs, it also collects info about hal
which is deprecated and mention the wrong soname, the attached patch
fixes those issues

diff -Nru libmtp-1.1.10/debian/apport/source_libmtp.py 
libmtp-1.1.10/debian/apport/source_libmtp.py
--- libmtp-1.1.10/debian/apport/source_libmtp.py        2015-10-20 
18:50:53.000000000 +0200
+++ libmtp-1.1.10/debian/apport/source_libmtp.py        2015-10-21 
16:02:42.000000000 +0200
@@ -9,30 +9,31 @@
 (c) 2009 Sense Hofstede <se...@qense.nl>
 '''
 
+import apport.hookutils
+
 def add_info(report, ui):
     
     ui.information('Please make sure the affected device is connected and on 
before continuing.')
     
-    attach_related_packages(report, [
-        "hal",
+    apport.hookutils.attach_related_packages(report, [
         "udev",
         ])
         
     # Try using the mtp-detect command to obtain more information
-    if command_available("mtp-detect"):
-        report['MTPDetect'] = command_output("mtp-detect")
+    if apport.hookutils.command_available("mtp-detect"):
+        report['MTPDetect'] = apport.hookutils.command_output("mtp-detect")
     else:
         ui.information("Please install the package 'mtp-tools' so we can 
gather "\
                         "more detailed debugging information. Afterwards, 
rerun " \
                         "the command 'ubuntu-bug libmtp8' or add more 
information "\
                         "to an existing bug report by running the command "\
-                        "'apport-collect -p libmtp8 '<bugnumber>', replacing "\
+                        "'apport-collect -p libmtp9 '<bugnumber>', replacing "\
                         "<bugnumber> with the number of your bug report.")
     
     # Obtain information about changes to udev configuration files
-    attach_conffiles(report, "udev")
+    apport.hookutils.attach_conffiles(report, "udev")
     # Attach the udev log file
-    attach_file_if_exists(report, '/var/log/udev', 'UdevLog')
+    apport.hookutils.attach_file_if_exists(report, '/var/log/udev', 'UdevLog')
     
     # Get all connected USB devices
-    report['USBDevices'] = usb_devices()
+    report['USBDevices'] = apport.hookutils.usb_devices()
diff -Nru libmtp-1.1.10/debian/changelog libmtp-1.1.10/debian/changelog
--- libmtp-1.1.10/debian/changelog      2015-10-20 19:11:44.000000000 +0200
+++ libmtp-1.1.10/debian/changelog      2015-10-21 16:07:40.000000000 +0200
@@ -1,3 +1,11 @@
+libmtp (1.1.10-2) unstable; urgency=medium
+
+  * debian/apport/source_libmtp.py:
+    - updated apport hook to work, import what we need, mention the current
+      soname version and don't include hal info (lp: #1172123)
+
+ -- Sebastien Bacher <seb...@ubuntu.com>  Wed, 21 Oct 2015 16:03:17 +0200
+
 libmtp (1.1.10-1) unstable; urgency=medium
 
   * New upstream bugfix release.

Reply via email to