Your message dated Sun, 25 Mar 2007 12:02:08 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#415271: fixed in xvmount 3.7-15
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xvmount
Version: 3.7-14
Severity: normal
Tags: patch

[EMAIL PROTECTED]:~# xvmountconfig 

You may now select the user mountable devices from /etc/fstab
which are to be made available for mounting by xvmount.
uniq: invalid option -- W
Try `uniq --help' for more information.
[EMAIL PROTECTED]:~# grep uniq /usr/sbin/xvmountconfig 
sort -s |uniq -W 1 --separator='*'`"

Those Debian-specific options have _both_ been removed in Etch
coreutils.  And now that I look into it, I notice that
xvmountconfig's giant backtick process could be improved in several
ways. 

First, there's no need for an initial egrep when you could do all
the work in sed -r: 

 sed -r /etc/fstab -e '/^[[:space:]]*#/d' \
    -e '/([^[:space:]]+[[:space:]]+){3}.*\busers?\b/!d' \
    -e 's/[[:space:]][[:space:]]*/ /g' \
    -e 's/^ ?([^ ]*) ([^ ]*).*/\2*\1/'

(Note that fstab lines with leading whitespace are valid!)

Then the list is sorted, using asterisk as the field-separator
rather than, say, NUL; this means the mountpoint "/mnt" sorts
between "/mnt%99" and "/mnt/foo", which seems unfortunate.  And
shouldn't this be controlling for $LC_COLLATE?  But never mind all
this.  

Then you uniqify it, using uniq -W 1 --separator='*' to ensure that
in cases like this:

 /dev/floppy /mnt auto    rw,noauto,user
 /dev/cdrom  /mnt iso9660 ro,noauto,user

the /dev/floppy line (alphabetically later) is silently discarded.
I don't see any way of keeping this behaviour with Etch's uniq, but
is it really sensible to be uniqifying in the first place?  Wouldn't
it be more appropriate to bail out saying "I can't tell what you
want to have mounting on /mnt!"?  In other words:

LIST=$(sed blah blah blah | sort)

# do the check-for-valid-lines dance, then:

 DUPE=$(echo "$LIST" | sed 's/\*.*//' | uniq -d)

if [ -n "${DUPE}" ]
then
    do a similar complain/restoreconfig/die
fi

Patch to this effect attached.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18.hurakan
Locale: LANG=en_GB.iso8859-1, LC_CTYPE=en_GB.iso8859-1 (charmap=ISO-8859-1)

Versions of packages xvmount depends on:
ii  debconf [debconf-2.0]       1.5.11       Debian configuration management sy
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  xviewg                      3.2p1.4-21.1 XView shared libraries

xvmount recommends no packages.

-- debconf information:
* xvmount/generate_failed:
  xvmount/wrong_format:
  xvmount/convert_failed:
  xvmount/empty_fstab:
  xvmount/convert_old_config: true
--- /usr/sbin/xvmountconfig.old	2006-09-26 12:15:57.000000000 +0000
+++ /usr/sbin/xvmountconfig	2007-03-17 18:04:06.000000000 +0000
@@ -118,11 +118,10 @@
 fi
 
 # Treat all device types
-LIST="`egrep -e '([^[:space:]]+[[:space:]]+){3}.*,?user,?' /etc/fstab |\
-sed 	-e '/^[[:space:]]*#/d' \
-	-e 's/[[:space:]][[:space:]]*/ /g' \
-	-e 's/^\([^ ]*\) \([^ ]*\).*/\2*\1/' |\
-sort -s |uniq -W 1 --separator='*'`"
+LIST=$(sed -r /etc/fstab -e '/^[[:space:]]*#/d' \
+    -e '/([^[:space:]]+[[:space:]]+){3}.*\busers?\b/!d' \
+    -e 's/[[:space:]][[:space:]]*/ /g' \
+    -e 's/^ ?([^ ]*) ([^ ]*).*/\2*\1/')
 
 # Check for valid lines
 if [ -z "${LIST}" ]
@@ -136,6 +135,21 @@
   exit 8
 fi
 
+# Check for ambiguous mountpoints
+DUPE=$(echo "$LIST" | sed 's/\*.*//' | uniq -d)
+
+if [ -n "${DUPE}" ]
+then
+  echo "Ambiguous mountpoint found in /etc/fstab:"
+  echo "$DUPE"
+  if [ -r ${DIR}/${CONFIGFILE}.bak ]
+  then
+     echo "Your old configuration file is restored."
+     mv ${DIR}/${CONFIGFILE}.bak ${DIR}/${CONFIGFILE}
+  fi
+  exit 8
+fi
+
 # Get input - loop 
 DOUBLE=1
 while [ ${DOUBLE} = 1 ] ; do

--- End Message ---
--- Begin Message ---
Source: xvmount
Source-Version: 3.7-15

We believe that the bug you reported is fixed in the latest version of
xvmount, which is due to be installed in the Debian FTP archive:

xvmount_3.7-15.diff.gz
  to pool/main/x/xvmount/xvmount_3.7-15.diff.gz
xvmount_3.7-15.dsc
  to pool/main/x/xvmount/xvmount_3.7-15.dsc
xvmount_3.7-15_i386.deb
  to pool/main/x/xvmount/xvmount_3.7-15_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Volker Ossenkopf <[EMAIL PROTECTED]> (supplier of updated xvmount package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 25 Mar 2007 14:00:00 +0200
Source: xvmount
Binary: xvmount
Architecture: source i386
Version: 3.7-15
Distribution: unstable
Urgency: low
Maintainer: Volker Ossenkopf <[EMAIL PROTECTED]>
Changed-By: Volker Ossenkopf <[EMAIL PROTECTED]>
Description: 
 xvmount    - Small graphical utility for mounting devices by users
Closes: 415271
Changes: 
 xvmount (3.7-15) unstable; urgency=low
 .
   * fixed incompatibility of xvmountconfig with Etch uniq. Closes: #415271
Files: 
 76a536ace1d460725a9c4873d4a93a92 577 utils optional xvmount_3.7-15.dsc
 84b19818f55f5ed0b12c84efdea2246c 16381 utils optional xvmount_3.7-15.diff.gz
 c09dde9df4e52ac5fddb26b6b2d4f3f4 24130 utils optional xvmount_3.7-15_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGBmJ2ilantJo6v0gRAhO3AJ4sRA03ZEH8kr88FY84h8eSvKlqvQCZAbP5
M4L/Qb1VzIBiRYOipg7tKuU=
=7iOS
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to