Package: libmtp8
Version: 1.0.6-4
Tags: patch
Followup-For: Bug #624537
Hi!
Just adding libmtp-runtime to the recommends does not fix the bug. The udev
rules
should check, if mtp-probe exists and if it is executable. I created a patch for
mtp-hotplug to get this feature using standard udev facilities. The only
drawback
is, that TEST requires an full path. So i have to remove the shortcut for
PROGRAM
if mtp-probe is in the default /lib/udev directory.
Greetings
Felix Rublack
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libmtp8 depends on:
ii libc6 2.13-2 Embedded GNU C Library: Shared lib
ii libusb-0.1-4 2:0.1.12-17 userspace USB programming library
Versions of packages libmtp8 recommends:
pn libmtp-runtime <none> (no description available)
ii udev 168-1 /dev/ and hotplug management daemo
libmtp8 suggests no packages.
-- no debconf information
diff -r libmtp-1.0.6/util/mtp-hotplug.c libmtp-1.0.6.old/util/mtp-hotplug.c
108a109,112
> /* Don't add the standard udev path... */
> if (!strcmp(mtp_probe_dir, "/lib/udev/")) {
> mtp_probe_dir[0] = '\0';
> }
241,242c245
<
< printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"00|02|06|ff\", TEST{100}==\"%smtp-probe\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, mtp_probe_dir, action);
---
> printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"00|02|06|ff\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, action);