1
Description: Avoids to glob .dpkg-old files by specifically globbing what we
2
want (this allows to filter out other undesired files).
3
Bugs: http://bugs.debian.org/579981
6
Author: Didier Raboud <didier@raboud.com>
7
Last-Update: 2010-05-03
9
Index: usb-modeswitch.git/usb_modeswitch.tcl
10
===================================================================
11
--- usb-modeswitch.git.orig/usb_modeswitch.tcl 2010-05-03 09:04:22.000000000 +0200
12
+++ usb-modeswitch.git/usb_modeswitch.tcl 2010-05-03 10:57:21.000000000 +0200
14
# which would point to a possible ambiguity. If so, check if
15
# SCSI values are needed
17
-set configList [glob -nocomplain $dbdir/$usb(idVendor):$usb(idProduct)*]
18
+# The glob matches $idVendor:$idProduct without postfix and with :spec=value postfixes
19
+# This allows to filter out .dpkg-old files
20
+set configList [glob -nocomplain $dbdir/$usb(idVendor):$usb(idProduct){,\[:a-Z0-9=\]*}]
21
if {[llength $configList] == 0} {
22
Log "Aargh! Config file missing for $usb(idVendor):$usb(idProduct)! Exiting"
25
# end and provide a fallback
28
-set configList [glob -nocomplain $dbdir/$usb(idVendor):$usb(idProduct)*]
29
+# The glob matches $idVendor:$idProduct without postfix and with :spec=value postfixes
30
+# This allows to filter out .dpkg-old files
31
+set configList [glob -nocomplain $dbdir/$usb(idVendor):$usb(idProduct){,\[:a-Z0-9=\]*}]
32
foreach configuration [lsort -decreasing $configList] {
33
Log "checking config: $configuration"
34
if [MatchDevice $configuration] {