[Pkg-utopia-commits] r97 - in packages/gnome-volume-manager/trunk/debian: . patches
Sjoerd Simons
sjoerd@haydn.debian.org
Thu, 18 Nov 2004 07:24:48 -0700
Author: sjoerd
Date: 2004-11-18 07:24:35 -0700 (Thu, 18 Nov 2004)
New Revision: 97
Removed:
packages/gnome-volume-manager/trunk/debian/patches/02_search_fstab.patch
Modified:
packages/gnome-volume-manager/trunk/debian/changelog
packages/gnome-volume-manager/trunk/debian/patches/03_browse_fixup.patch
packages/gnome-volume-manager/trunk/debian/patches/04_honor_automount_enabled_hint.patch
packages/gnome-volume-manager/trunk/debian/patches/06_mount_at_start.patch
packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch
packages/gnome-volume-manager/trunk/debian/patches/13_dont_set_capabilities.patch
packages/gnome-volume-manager/trunk/debian/patches/20_specify_mountprogram.patch
Log:
Removed 02_search_fstab.patch and update other patches
Modified: packages/gnome-volume-manager/trunk/debian/changelog
===================================================================
--- packages/gnome-volume-manager/trunk/debian/changelog 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/changelog 2004-11-18 14:24:35 UTC (rev 97)
@@ -24,6 +24,8 @@
+ Added. Allows to indicated the mount and unmount programs at compile
time.
* Use pmount-hal and pumount as commands for mounting and unmounting.
+ * debian/patches/02_search_fstab.patch
+ + Removed. pmount searches fstab now, so we don't have too.
-- Sjoerd Simons <sjoerd@debian.org> Wed, 17 Nov 2004 11:44:57 +0100
Deleted: packages/gnome-volume-manager/trunk/debian/patches/02_search_fstab.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/02_search_fstab.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/02_search_fstab.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -1,104 +0,0 @@
-diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-10-25 21:12:11.000000000 +0200
-+++ gnome-volume-manager/src/manager.c 2004-11-17 15:39:30.891370034 +0100
-@@ -23,6 +23,8 @@
- #include <libhal.h>
- #include <signal.h>
-
-+#include <mntent.h>
-+
- #include "gvm.h"
-
- #ifdef ENABLE_NLS
-@@ -447,6 +449,61 @@
- }
-
- /*
-+ * gvm_get_fstab_path - scans the fstab file for an entry matching the
-+ * specified device name, even if this entry is a symbolic link that eventually
-+ * resolves to the real device
-+ */
-+static gchar *
-+gvm_get_fstab_path (gchar *device) {
-+ struct mntent *mnt; /* pointer to the next mntent record */
-+ gchar *result = NULL; /* result of realpath, NULL if error */
-+ gchar *dest; /* destination of a symlink */
-+ gchar *tmp, *tmp2;
-+ FILE *fstab = setmntent("/etc/fstab" /* get this some other way? */, "r");
-+
-+ if (fstab == NULL) {
-+ warn("failed to open /etc/fstab");
-+ return NULL;
-+ }
-+
-+ /* loop over each fstab entry */
-+ while ((mnt = getmntent (fstab)) != NULL) {
-+ if (mnt->mnt_fsname[0] != '/' &&
-+ !g_file_test(mnt->mnt_fsname, G_FILE_TEST_EXISTS)) {
-+ continue;
-+ }
-+ if (!strcmp(mnt->mnt_fsname, device)) {
-+ result = g_strdup(mnt->mnt_fsname);
-+ break;
-+ }
-+ if (!g_file_test(mnt->mnt_fsname, G_FILE_TEST_IS_SYMLINK)) continue;
-+ /* symlink check if it links to the real device file */
-+ dest = g_file_read_link(mnt->mnt_fsname, NULL);
-+ if (dest == NULL) {
-+ continue;
-+ }
-+ if (dest[0] != '/') {
-+ /* not an absolute path, need to make it to one */
-+ tmp = g_path_get_dirname(mnt->mnt_fsname);
-+ tmp2 = dest;
-+ dest = g_build_filename(tmp, tmp2, NULL);
-+ g_free(tmp); g_free(tmp2);
-+ }
-+ if (!strcmp(dest, device)) {
-+ result = g_strdup(mnt->mnt_fsname);
-+ g_free(dest);
-+ break;
-+ }
-+ g_free(dest);
-+ }
-+ endmntent (fstab);
-+ if (result == NULL) {
-+ warn("%s not found in /etc/fstab", device);
-+ }
-+ return result;
-+}
-+
-+/*
- * gvm_device_mount - use BIN_MOUNT to mount the given device node.
- *
- * Note that this requires that the given device node is in /etc/fstab. This
-@@ -459,18 +516,25 @@
- {
- char *argv[3];
- GError *error = NULL;
-+ char *fstab_device;
- gint exit_status;
-
-+ fstab_device = gvm_get_fstab_path(device);
-+ if (fstab_device == NULL) {
-+ return FALSE;
-+ }
-+
- argv[0] = BIN_MOUNT;
-- argv[1] = device;
-+ argv[1] = fstab_device;
- argv[2] = NULL;
-
-- if (!g_spawn_sync (g_get_home_dir (), argv, NULL, 0, NULL,
-- NULL, NULL, NULL, &exit_status, &error)) {
-+ g_spawn_sync (g_get_home_dir (), argv, NULL, 0, NULL, NULL,
-+ NULL, NULL, &exit_status, &error);
-+ g_free(fstab_device);
-+ if (error) {
- warn ("failed to exec " BIN_MOUNT ": %s\n", error->message);
- return FALSE;
- }
--
- return (exit_status == 0);
- }
-
Modified: packages/gnome-volume-manager/trunk/debian/patches/03_browse_fixup.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/03_browse_fixup.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/03_browse_fixup.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -1,7 +1,7 @@
diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-11-17 15:40:39.287446000 +0100
-+++ gnome-volume-manager/src/manager.c 2004-11-17 15:41:15.044577131 +0100
-@@ -248,31 +248,32 @@
+--- gnome-volume-manager-old/src/manager.c 2004-10-25 21:12:11.000000000 +0200
++++ gnome-volume-manager/src/manager.c 2004-11-18 15:04:07.353196661 +0100
+@@ -246,31 +246,32 @@
/*
* gvm_check_dvd - is this a Video DVD? If so, do something about it.
*
@@ -42,7 +42,7 @@
}
#define ASK_PHOTOS_MSG "There are photographs on this device.\n\n" \
-@@ -284,7 +285,8 @@
+@@ -282,7 +283,8 @@
* unit from a digital camera (e.g., a compact flash card). If it is, then
* ask the user if he wants to import the photos.
*
@@ -52,7 +52,7 @@
*
* FIXME: Should probably not prompt the user and just do it automatically.
* This now makes sense, as gphoto added an import mode.
-@@ -302,7 +304,6 @@
+@@ -300,7 +302,6 @@
if (!g_file_test (dcim_path, G_FILE_TEST_IS_DIR))
goto out;
@@ -60,7 +60,7 @@
dbg ("Photos detected: %s\n", dcim_path);
/* add the "content.photos" capability to this device */
-@@ -310,6 +311,7 @@
+@@ -308,6 +309,7 @@
warn ("failed to set content.photos on %s\n", device);
if (config.autophoto) {
Modified: packages/gnome-volume-manager/trunk/debian/patches/04_honor_automount_enabled_hint.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/04_honor_automount_enabled_hint.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/04_honor_automount_enabled_hint.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -1,7 +1,7 @@
diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-11-17 16:08:35.396027000 +0100
-+++ gnome-volume-manager/src/manager.c 2004-11-17 16:09:38.532745793 +0100
-@@ -245,6 +245,26 @@
+--- gnome-volume-manager-old/src/manager.c 2004-11-18 15:04:19.500931000 +0100
++++ gnome-volume-manager/src/manager.c 2004-11-18 15:04:19.696942980 +0100
+@@ -243,6 +243,26 @@
return retval;
}
@@ -28,7 +28,7 @@
/*
* gvm_check_dvd - is this a Video DVD? If so, do something about it.
*
-@@ -622,6 +642,8 @@
+@@ -558,6 +578,8 @@
switch (action) {
case MOUNT:
@@ -37,7 +37,7 @@
gvm_device_mount (device);
mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
break;
-@@ -698,7 +720,7 @@
+@@ -634,7 +656,7 @@
} else if (has_audio && has_data) {
gvm_ask_mixed (udi);
} else if (has_data) {
@@ -46,7 +46,7 @@
gvm_device_mount (device);
mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
}
-@@ -756,9 +778,10 @@
+@@ -692,9 +714,10 @@
} else {
dbg ("Added: %s\n", device);
@@ -59,7 +59,7 @@
}
}
-@@ -820,9 +843,10 @@
+@@ -756,9 +779,10 @@
/* folks, we have a new device! */
dbg ("Added: %s\n", device);
@@ -72,7 +72,7 @@
}
out:
-@@ -1031,6 +1055,9 @@
+@@ -967,6 +991,9 @@
"volume.fsusage"),
"filesystem") != 0)
continue;
Modified: packages/gnome-volume-manager/trunk/debian/patches/06_mount_at_start.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/06_mount_at_start.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/06_mount_at_start.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -1,7 +1,7 @@
diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-11-17 16:18:28.644043000 +0100
-+++ gnome-volume-manager/src/manager.c 2004-11-17 16:19:42.455455979 +0100
-@@ -1033,9 +1033,8 @@
+--- gnome-volume-manager-old/src/manager.c 2004-11-18 15:04:36.348949000 +0100
++++ gnome-volume-manager/src/manager.c 2004-11-18 15:04:36.562962730 +0100
+@@ -969,9 +969,8 @@
char **volumes;
char *udi;
char *device_file;
@@ -13,7 +13,7 @@
volumes = hal_find_device_by_capability (ctx, "volume", &num_volumes);
for (i = 0; i < num_volumes; i++) {
-@@ -1059,6 +1058,20 @@
+@@ -995,6 +994,20 @@
if (gvm_is_manual_mount(ctx, udi))
continue;
Modified: packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -1,7 +1,7 @@
diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-11-17 16:03:20.628507000 +0100
-+++ gnome-volume-manager/src/manager.c 2004-11-17 16:03:49.415199839 +0100
-@@ -53,6 +53,7 @@
+--- gnome-volume-manager-old/src/manager.c 2004-11-18 15:05:30.129197000 +0100
++++ gnome-volume-manager/src/manager.c 2004-11-18 15:05:30.417214796 +0100
+@@ -51,6 +51,7 @@
static struct gvm_configuration config;
static LibHalContext *hal_ctx;
@@ -9,7 +9,7 @@
/** List of UDI's for volumes mounted by g-v-m that we need to apply policy to*/
static GSList *mounted_volumes_policy_queue = NULL;
-@@ -60,6 +61,9 @@
+@@ -58,6 +59,9 @@
/** List of UDI's of all volumes mounted during the lifetime of the program */
static GSList *all_mounted_volumes = NULL;
@@ -19,7 +19,7 @@
/*
* gvm_load_config - synchronize gconf => config structure
*/
-@@ -946,6 +950,58 @@
+@@ -904,6 +908,58 @@
{
}
@@ -78,7 +78,7 @@
/** Invoked by libhal for integration with our mainloop.
*
* @param ctx LibHal context
-@@ -955,7 +1011,12 @@
+@@ -913,7 +969,12 @@
hal_mainloop_integration (LibHalContext *ctx __attribute__((__unused__)),
DBusConnection * dbus_connection)
{
@@ -91,7 +91,7 @@
}
/** Internal HAL initialization function
-@@ -1078,7 +1139,12 @@
+@@ -1037,7 +1098,12 @@
char *device_file;
char *udi;
@@ -105,7 +105,7 @@
for (i = all_mounted_volumes; i != NULL; i = g_slist_next (i)) {
-@@ -1150,17 +1216,23 @@
+@@ -1109,17 +1175,23 @@
gtk_main_quit ();
}
@@ -136,7 +136,7 @@
gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
argc, argv, GNOME_PARAM_NONE);
-@@ -1181,7 +1253,7 @@
+@@ -1140,7 +1212,7 @@
gtk_signal_connect (GTK_OBJECT (client), "die",
GTK_SIGNAL_FUNC (gvm_die), NULL);
Modified: packages/gnome-volume-manager/trunk/debian/patches/13_dont_set_capabilities.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/13_dont_set_capabilities.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/13_dont_set_capabilities.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -1,7 +1,7 @@
diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-11-17 16:04:23.128182000 +0100
-+++ gnome-volume-manager/src/manager.c 2004-11-17 16:04:38.698098036 +0100
-@@ -312,10 +312,6 @@
+--- gnome-volume-manager-old/src/manager.c 2004-11-18 15:05:44.994094000 +0100
++++ gnome-volume-manager/src/manager.c 2004-11-18 15:05:45.414120123 +0100
+@@ -328,10 +328,6 @@
dbg ("Photos detected: %s\n", dcim_path);
Modified: packages/gnome-volume-manager/trunk/debian/patches/20_specify_mountprogram.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/20_specify_mountprogram.patch 2004-11-18 12:41:32 UTC (rev 96)
+++ packages/gnome-volume-manager/trunk/debian/patches/20_specify_mountprogram.patch 2004-11-18 14:24:35 UTC (rev 97)
@@ -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-17 19:21:09.082868949 +0100
++++ gnome-volume-manager/configure 2004-11-18 15:07:32.017555854 +0100
@@ -309,7 +309,7 @@
# include <unistd.h>
#endif"
@@ -394,7 +394,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-17 19:12:58.529977042 +0100
++++ gnome-volume-manager/configure.in 2004-11-18 15:07:32.460582602 +0100
@@ -8,12 +8,21 @@
AC_PROG_CC
@@ -422,9 +422,9 @@
diff -ruN gnome-volume-manager-old/src/manager.c gnome-volume-manager/src/manager.c
---- gnome-volume-manager-old/src/manager.c 2004-11-17 19:12:31.586392000 +0100
-+++ gnome-volume-manager/src/manager.c 2004-11-17 19:18:56.452051176 +0100
-@@ -147,20 +147,20 @@
+--- gnome-volume-manager-old/src/manager.c 2004-11-18 15:07:31.741539000 +0100
++++ gnome-volume-manager/src/manager.c 2004-11-18 15:09:38.676203127 +0100
+@@ -145,20 +145,20 @@
gvm_config_changed, NULL, NULL, NULL);
}
@@ -454,7 +454,7 @@
/* perform s/%d/device/, s/%m/path/ and s/%h/udi/ */
new_command = g_strdup (command);
-@@ -196,26 +196,69 @@
+@@ -194,26 +194,69 @@
}
}
g_string_append (exec, q);
@@ -536,40 +536,33 @@
}
/*
-@@ -534,30 +577,9 @@
+@@ -477,23 +520,9 @@
* @return TRUE iff the mount was succesful
*/
static gboolean
-gvm_device_mount (char *device)
-+gvm_device_mount (const char *udi,const char *device)
++gvm_device_mount (const char *udi, const char *device)
{
- char *argv[3];
- GError *error = NULL;
-- char *fstab_device;
- gint exit_status;
-
-- fstab_device = gvm_get_fstab_path(device);
-- if (fstab_device == NULL) {
-- return FALSE;
-- }
--
- argv[0] = BIN_MOUNT;
-- argv[1] = fstab_device;
+- argv[1] = device;
- argv[2] = NULL;
-
-- g_spawn_sync (g_get_home_dir (), argv, NULL, 0, NULL, NULL,
-- NULL, NULL, &exit_status, &error);
-- g_free(fstab_device);
-- if (error) {
+- if (!g_spawn_sync (g_get_home_dir (), argv, NULL, 0, NULL,
+- NULL, NULL, NULL, &exit_status, &error)) {
- warn ("failed to exec " BIN_MOUNT ": %s\n", error->message);
- return FALSE;
- }
+-
- return (exit_status == 0);
+ return (gvm_run_command_sync(device , BIN_MOUNT, NULL, udi) == 0);
}
/*
-@@ -569,23 +591,8 @@
+@@ -505,23 +534,8 @@
* @return TRUE iff the mount was succesful
*/
static gboolean
@@ -595,7 +588,7 @@
}
/*
-@@ -644,7 +651,7 @@
+@@ -580,7 +594,7 @@
case MOUNT:
if (gvm_is_manual_mount(hal_ctx, udi))
break;
@@ -604,7 +597,7 @@
mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
break;
case PLAY:
-@@ -721,7 +728,7 @@
+@@ -657,7 +671,7 @@
gvm_ask_mixed (udi);
} else if (has_data) {
if (config.automount_media && !gvm_is_manual_mount(hal_ctx, udi)) {
@@ -613,7 +606,7 @@
mounted_volumes_policy_queue = g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
}
} else if (is_blank) {
-@@ -779,7 +786,7 @@
+@@ -715,7 +729,7 @@
dbg ("Added: %s\n", device);
if (config.automount_drives && !gvm_is_manual_mount(hal_ctx, udi)) {
@@ -622,7 +615,7 @@
mounted_volumes_policy_queue =
g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
}
-@@ -844,7 +851,7 @@
+@@ -780,7 +794,7 @@
dbg ("Added: %s\n", device);
if (config.automount_drives && !gvm_is_manual_mount(ctx, udi)) {
@@ -631,7 +624,7 @@
mounted_volumes_policy_queue =
g_slist_append (mounted_volumes_policy_queue, g_strdup (udi));
}
-@@ -925,7 +932,7 @@
+@@ -861,7 +875,7 @@
policy_udi = g_slist_find_custom (mounted_volumes_policy_queue,
udi,
@@ -640,7 +633,7 @@
if (policy_udi != NULL) {
g_free (policy_udi->data);
mounted_volumes_policy_queue = g_slist_delete_link (mounted_volumes_policy_queue,
-@@ -1136,7 +1143,7 @@
+@@ -1072,7 +1086,7 @@
dbg ("mount_all: mounting %s\n", device_file);
@@ -649,7 +642,7 @@
hal_free_string (device_file);
} else
-@@ -1175,7 +1182,7 @@
+@@ -1111,7 +1125,7 @@
dbg ("unmount_all: unmounting %s\n", device_file);