Package: libmtp
Version: 1.1.10-2
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch xenial
Hello,
libmtp's apport hook still tries to attach /var/log/udev. But this is
an Upstart-ism (maybe even Ubuntu-ism), and neither particularly
useful nor even present/updated under systemd or sysvinit. (Please see
https://launchpad.net/bugs/1537211 for some details).
The attached patch moves to apport.hookutils.attach_hardware()
instead, which attaches more information and the complete udev
database. This will then also contain hardware which got plugged in
after boot.
I also took the liberty to remove the trailing whitespace.
Thanks for considering,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
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-28
23:07:38.000000000 +0100
+++ libmtp-1.1.10/debian/apport/source_libmtp.py 2016-01-26
08:55:41.000000000 +0100
@@ -12,13 +12,13 @@
import apport.hookutils
def add_info(report, ui):
-
+
ui.information('Please make sure the affected device is connected and on
before continuing.')
-
+
apport.hookutils.attach_related_packages(report, [
"udev",
])
-
+
# Try using the mtp-detect command to obtain more information
if apport.hookutils.command_available("mtp-detect"):
report['MTPDetect'] = apport.hookutils.command_output("mtp-detect")
@@ -29,11 +29,10 @@
"to an existing bug report by running the command "\
"'apport-collect -p libmtp9 '<bugnumber>', replacing "\
"<bugnumber> with the number of your bug report.")
-
+
# Obtain information about changes to udev configuration files
apport.hookutils.attach_conffiles(report, "udev")
- # Attach the udev log file
- apport.hookutils.attach_file_if_exists(report, '/var/log/udev', 'UdevLog')
-
+ apport.hookutils.attach_hardware(report)
+
# Get all connected 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-28 23:12:52.000000000 +0100
+++ libmtp-1.1.10/debian/changelog 2016-01-26 08:57:25.000000000 +0100
@@ -1,3 +1,10 @@
+libmtp (1.1.10-2ubuntu1) xenial; urgency=medium
+
+ * debian/apport/source_libmtp.py: Stop attaching /var/log/udev (which is
+ only created under Upstart). Use apport's attach_hardware() instead.
+
+ -- Martin Pitt <[email protected]> Tue, 26 Jan 2016 08:56:36 +0100
+
libmtp (1.1.10-2) unstable; urgency=medium
* debian/apport/source_libmtp.py: