On Tuesday 14 June 2011 11.58:43 Alex Hermann wrote: > I hope i have explained the issue a bit better now.
Indeed you have, and very clearly so. Thanks for that ! I prepared a git commit for the packaging repository that incorporates your changes and attributes them to you. What do you think: can I push this commit? Cheers, -- OdyX
From d71eb354f206ff4b69bc746e63efe2e43d250ea4 Mon Sep 17 00:00:00 2001 From: Alex Hermann <[email protected]> Date: Tue, 14 Jun 2011 10:46:37 +0200 Subject: [PATCH] Fix /etc/usb_modeswitch.d overriding. In some cases (e.g. new device files not in tarball), overriding device configuration files from /etc/usb_modeswitch.d failed to work due to incoherent values appended to configList. The 02_allow_override_from_etc.patch change fixes that in the most common case (when there is a tarball available). The 02.1_fix_no-tarball_configList.patch change alters the upstream code to be coherent too. Closes: #630081 Signed-off-by: Didier Raboud <[email protected]> --- .../patches/02.1_fix_no-tarball_configList.patch | 16 ++++++++++++++++ debian/patches/02_allow_override_from_etc.patch | 7 ++++--- debian/patches/series | 1 + 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 debian/patches/02.1_fix_no-tarball_configList.patch diff --git a/debian/patches/02.1_fix_no-tarball_configList.patch b/debian/patches/02.1_fix_no-tarball_configList.patch new file mode 100644 index 0000000..94c9ce4 --- /dev/null +++ b/debian/patches/02.1_fix_no-tarball_configList.patch @@ -0,0 +1,16 @@ +Description: Fix the configList variable initialisation when there is no + tarball available (in coherence with 02_allow_override_from_etc.patch). +Bug-Debian: 630081 +Author: Alex Hermann <[email protected]> +Last-Update: 2011-06-14 +--- a/usb_modeswitch.tcl ++++ b/usb_modeswitch.tcl +@@ -574,7 +574,7 @@ + append configList " " [glob -nocomplain -tails -directory $settings(dbdir_etc) $config*] + set configList [lsearch -glob -all -inline $configList $config*] + } else { +- set configList [glob -nocomplain $settings(dbdir)/$config*] ++ set configList [glob -nocomplain -tails -directory $settings(dbdir) $config*] + } + + return $configList diff --git a/debian/patches/02_allow_override_from_etc.patch b/debian/patches/02_allow_override_from_etc.patch index 212a22e..5e39b7c 100644 --- a/debian/patches/02_allow_override_from_etc.patch +++ b/debian/patches/02_allow_override_from_etc.patch @@ -1,7 +1,8 @@ Description: Allow tarball database entries overriding from /etc/usb_modeswitch.d Author: Didier Raboud <[email protected]> -Forwarded: pending -Last-Update: 2011-03-16 +Author: Alex Hermann <[email protected]> +Reviewed-by: Didier Raboud <[email protected]> +Last-Update: 2011-06-14 --- a/usb_modeswitch.tcl +++ b/usb_modeswitch.tcl @@ -54,6 +54,9 @@ @@ -19,7 +20,7 @@ Last-Update: 2011-03-16 } 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*] set configList [lsearch -glob -all -inline $configList $config*] } else { set configList [glob -nocomplain $settings(dbdir)/$config*] diff --git a/debian/patches/series b/debian/patches/series index 5a1b576..7ac80b6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01_extract_to_var_lib_not_tmp.patch 02_allow_override_from_etc.patch +02.1_fix_no-tarball_configList.patch 03_use_udev_specifics.patch -- 1.7.2.5
signature.asc
Description: This is a digitally signed message part.

