[Pkg-utopia-commits] r140 - in packages/gnome-volume-manager/trunk/debian: . patches

Sjoerd Simons sjoerd@haydn.debian.org
Sat, 18 Dec 2004 13:11:50 -0700


Author: sjoerd
Date: 2004-12-18 13:11:42 -0700 (Sat, 18 Dec 2004)
New Revision: 140

Modified:
   packages/gnome-volume-manager/trunk/debian/changelog
   packages/gnome-volume-manager/trunk/debian/patches/20_specify_programs.patch
Log:
Updates 20_specify_programs.patch to cope with spaces in mountpoints

Modified: packages/gnome-volume-manager/trunk/debian/changelog
===================================================================
--- packages/gnome-volume-manager/trunk/debian/changelog	2004-12-08 15:28:22 UTC (rev 139)
+++ packages/gnome-volume-manager/trunk/debian/changelog	2004-12-18 20:11:42 UTC (rev 140)
@@ -1,3 +1,11 @@
+gnome-volume-manager (1.1.2-5) unstable; urgency=low
+
+  * debian/patches/20_specify_programs.patch
+    + updated. Quote all arguments to shell commands correctly. Fixes issues
+    when a mountpoint contains spaces. 
+
+ -- Sjoerd Simons <sjoerd@debian.org>  Sat, 18 Dec 2004 20:45:33 +0100
+
 gnome-volume-manager (1.1.2-4) unstable; urgency=low
 
   * debian/patches/30_26_kernel_hint.patch 

Modified: packages/gnome-volume-manager/trunk/debian/patches/20_specify_programs.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/20_specify_programs.patch	2004-12-08 15:28:22 UTC (rev 139)
+++ packages/gnome-volume-manager/trunk/debian/patches/20_specify_programs.patch	2004-12-18 20:11:42 UTC (rev 140)
@@ -1,6 +1,6 @@
 diff -ruN gnome-volume-manager-old/configure gnome-volume-manager/configure
 --- gnome-volume-manager-old/configure	2004-10-30 17:12:10.000000000 +0200
-+++ gnome-volume-manager/configure	2004-11-19 21:13:53.414561651 +0100
++++ gnome-volume-manager/configure	2004-12-18 20:30:20.000000000 +0100
 @@ -309,7 +309,7 @@
  # include <unistd.h>
  #endif"
@@ -402,7 +402,7 @@
    sed "$ac_vpsub
 diff -ruN gnome-volume-manager-old/configure.in gnome-volume-manager/configure.in
 --- gnome-volume-manager-old/configure.in	2004-10-30 17:10:32.000000000 +0200
-+++ gnome-volume-manager/configure.in	2004-11-19 21:13:26.969020312 +0100
++++ gnome-volume-manager/configure.in	2004-12-18 20:30:20.000000000 +0100
 @@ -8,12 +8,25 @@
  AC_PROG_CC
  
@@ -434,8 +434,8 @@
  
  
 diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c	2004-11-19 21:12:17.338966000 +0100
-+++ gnome-volume-manager/src/manager.c	2004-11-19 21:12:17.595981886 +0100
+--- gnome-volume-manager-old/src/manager.c	2004-12-18 20:30:20.000000000 +0100
++++ gnome-volume-manager/src/manager.c	2004-12-18 20:42:19.000000000 +0100
 @@ -145,20 +145,20 @@
  				 gvm_config_changed, NULL, NULL, NULL);
  }
@@ -462,11 +462,44 @@
  	GError *error = NULL;
  	GString *exec = g_string_new (NULL);
  	char *p, *q;
-+  gchar *result;
++  gchar *result, *tmp;
  
  	/* perform s/%d/device/, s/%m/path/ and s/%h/udi/ */
  	new_command = g_strdup (command);
-@@ -194,26 +194,69 @@
+@@ -170,7 +170,9 @@
+ 				goto error;
+ 			*p = '\0';
+ 			g_string_append (exec, q);
+-			g_string_append (exec, device);
++      tmp = g_shell_quote(device);
++			g_string_append (exec, tmp);
++      g_free(tmp);
+ 			q = p + 2;
+ 			p = p + 2;
+ 		} else if (*(p + 1) == 'm') {
+@@ -178,7 +180,9 @@
+ 				goto error;
+ 			*p = '\0';
+ 			g_string_append (exec, q);
+-			g_string_append (exec, path);
++      tmp = g_shell_quote(path);
++			g_string_append (exec, tmp);
++      g_free(tmp);
+ 			q = p + 2;
+ 			p = p + 2;
+ 		} else if (*(p + 1) == 'h') {
+@@ -186,34 +190,77 @@
+ 				goto error;
+ 			*p = '\0';
+ 			g_string_append (exec, q);
+-			g_string_append (exec, "\"");
+-			g_string_append (exec, udi);
+-			g_string_append (exec, "\"");
++      tmp = g_shell_quote(udi);
++			g_string_append (exec, tmp);
++      g_free(tmp);
+ 			q = p + 2;
+ 			p = p + 2;
  		}
  	}
  	g_string_append (exec, q);
@@ -548,7 +581,7 @@
  }
  
  /*
-@@ -457,23 +500,9 @@
+@@ -457,23 +504,9 @@
   * @return TRUE iff the mount was succesful
   */
  static gboolean
@@ -574,7 +607,7 @@
  }
  
  /*
-@@ -485,23 +514,8 @@
+@@ -485,23 +518,8 @@
   * @return TRUE iff the mount was succesful
   */
  static gboolean
@@ -600,7 +633,7 @@
  }
  
  /*
-@@ -558,7 +572,7 @@
+@@ -558,7 +576,7 @@
  
  	switch (action) {
  	case MOUNT:
@@ -609,7 +642,7 @@
  		mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
  		break;
  	case PLAY:
-@@ -635,7 +649,7 @@
+@@ -635,7 +653,7 @@
  		gvm_ask_mixed (udi);
  	} else if (has_data) {
  		if (config.automount_media) {
@@ -618,7 +651,7 @@
  			mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
  		}
  	} else if (is_blank) {
-@@ -693,7 +707,7 @@
+@@ -693,7 +711,7 @@
  		dbg ("Added: %s\n", device);
  		
  		if (config.automount_drives) {
@@ -627,7 +660,7 @@
  			mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
  		}
  	}
-@@ -757,7 +771,7 @@
+@@ -757,7 +775,7 @@
  	dbg ("Added: %s\n", device);
  	
  	if (config.automount_drives) {
@@ -636,7 +669,7 @@
  		mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
  	}
  	
-@@ -837,7 +851,7 @@
+@@ -837,7 +855,7 @@
  
  		policy_udi = g_slist_find_custom (mounted_volumes_policy_queue, 
  						  udi, 
@@ -645,7 +678,7 @@
  		if (policy_udi != NULL) {
  			g_free (policy_udi->data);
  			mounted_volumes_policy_queue = g_slist_delete_link (mounted_volumes_policy_queue, 
-@@ -1045,7 +1059,7 @@
+@@ -1045,7 +1063,7 @@
  
  			dbg ("mount_all: mounting %s\n", device_file);
  
@@ -654,7 +687,7 @@
  
  			hal_free_string (device_file);
  		} else
-@@ -1084,7 +1098,7 @@
+@@ -1084,7 +1102,7 @@
  
  			dbg ("unmount_all: unmounting %s\n", device_file);