Le vendredi, 10 juin 2011 18.39:01, Alex Hermann a écrit : > Package: usb-modeswitch > Version: 1.1.7-1 > Severity: normal > > > The /usr/sbin/usb_modeswitch_dispatcher script has such bugs that the > documented feature of overriding configs via /etc/usb-modeswitch.d could > not possibly work. Attached patch fixes this feature.
Hi Alex, and thanks for your bugreport, First, let me disagree with the "could not possibly work" because: 1) I tested this patch and it "worked for me" 2) I made another user use the code in this patch and it "worked for him" (see https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch-data/+bug/776959 ) Second, can you show me a case where the code as shipped in 1.1.7-1 fails ? Now, for your patch (which I am happy to discuss; by the way): --- usb_modeswitch_dispatcher.orig 2011-03-16 14:04:26.000000000 +0100 +++ usb_modeswitch_dispatcher 2011-06-10 18:30:29.000000000 +0200 @@ -571,10 +571,10 @@ } set configList [split $configList \n] Log "Searching overriding entries named: $settings(dbdir_etc)/$config*" - append configList [glob -nocomplain $settings(dbdir_etc)/$config*] + append configList " " [glob -nocomplain -tails -directory $settings(dbdir_etc) $config*] What does this bring ? If I read it correctly, "my" line appends to the configList variable the matching "/etc/usb_modeswitch.d/${config}*" entries, while yours appends only the ${config}* part. I tried both options and both work identically (because , so I don't see what this change brings. set configList [lsearch -glob -all -inline $configList $config*] } else { - set configList [glob -nocomplain $settings(dbdir)/$config*] + set configList [glob -nocomplain -tails -directory $settings(dbdir_etc) $config*] } Also I don't understand that change. The idea of the original code is to look in dbdir (/usr/share/…) iff there is no available tarball: this is legacy code to support past usb-modeswitch-data versions. Changing that line to look into dbdir_etc changes the expectations one can have on the behaviour of usb-modeswitch. So all in all, in my humble opinion and under my current understanding, your patch doesn't do any harm, nor helps. Maybe I overlooked something and I would be happy to be proven wrong. Cheers, -- OdyX
signature.asc
Description: This is a digitally signed message part.