The variable quoting, though still a good thing to do, is not the
solution for this bug.

The real solution without being too invasive in the postinst script
code, seems to be changing IFS so that the for loop loops on the right
list of names even when they contain spaces.

New patch attached (this is the one I used in unstable).

-- 



--- tags/5.01-8/debian/geneweb.postinst	2009-08-06 07:59:11.000000000 +0200
+++ trunk/debian/geneweb.postinst	2009-12-20 17:07:15.000000000 +0100
@@ -169,22 +167,28 @@
 	#
 	# Thanks to Russell Sutherland for pointing this to me
 	# Bug: 179918
+	#
+	# Deal properly with database names that contain spaces
+	OLDIFS=${IFS}
+	IFS='
+'
 	for base in `find $GENEWEBDB -type d -name \*.gwb`
 	do
-	    chgrp $USERS_GROUP $base
-	    chmod g+w,g+s $base
+	    chgrp $USERS_GROUP "$base"
+	    chmod g+w,g+s "$base"
 	    # Fix files permissions. See #219779
 	    for file in `find $base -type f`
 	    do
-		chgrp $USERS_GROUP $file
-		chmod g+w $file
+		chgrp $USERS_GROUP "$file"
+		chmod g+w "$file"
 	    done
 	done
 	for imagedir in `find $GENEWEBDB/images -type d`
 	do
-	    chgrp $USERS_GROUP $imagedir
-	    chmod g+w,g+s $imagedir
+	    chgrp $USERS_GROUP "$imagedir"
+	    chmod g+w,g+s "$imagedir"
 	done
+	IFS=${OLDIFS}
 
 	# Values are read from debconf
 	# to update variables

Attachment: signature.asc
Description: Digital signature

Reply via email to