Hello community,
here is the log from the commit of package gnome-vfs2
checked in at Sat Jun 17 09:30:14 CEST 2006.
--------
--- GNOME/gnome-vfs2/gnome-vfs2.changes 2006-06-13 23:29:52.000000000 +0200
+++ gnome-vfs2/gnome-vfs2.changes 2006-06-17 00:23:45.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Jun 17 00:23:27 CEST 2006 - federico@novell.com
+
+- Added gnome-vfs2-183723-unix-mounts-plus-hal-mounts.diff to fix
+ https://bugzilla.novell.com/show_bug.cgi?id=183723. Our
+ gnome-vfs2-hal-mount.patch had removed the ability to mount certain
+ volumes through mount(8), instead of HAL. We need this for volumes
+ that don't have a HAL UDI, like NFS mounts listed in /etc/fstab.
+
+-------------------------------------------------------------------
New:
----
gnome-vfs2-183723-unix-mounts-plus-hal-mounts.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-vfs2.spec ++++++
--- /var/tmp/diff_new_pack.0Gh2KX/_old 2006-06-17 09:29:49.000000000 +0200
+++ /var/tmp/diff_new_pack.0Gh2KX/_new 2006-06-17 09:29:49.000000000 +0200
@@ -19,7 +19,7 @@
Requires: gnome-mime-data
Autoreqprov: on
Version: 2.12.2
-Release: 63
+Release: 64
Summary: The GNOME 2.x Desktop Virtual File System Libraries
URL: http://www.gnome.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -53,6 +53,7 @@
Patch34: gnome-vfs2-172870-unmount-uses-hal-udi-from-drive.diff
Patch35: gnome-vfs2-172680-novell-services.diff
Patch36: gnome-vfs-hu-translation-183987.patch
+Patch37: gnome-vfs2-183723-unix-mounts-plus-hal-mounts.diff
Obsoletes: gnome-vfs-extras
Provides: gnome-vfs-extras
@@ -164,6 +165,7 @@
%patch33 -p1
%patch34 -p1
%patch35 -p1
+%patch37 -p1
gnome-patch-translation-update
# These patches have it's own translation management:
%patch20
@@ -272,6 +274,12 @@
%{prefix}/share/gtk-doc/html/gnome-vfs-2.0
%changelog -n gnome-vfs2
+* Sat Jun 17 2006 - federico@novell.com
+- Added gnome-vfs2-183723-unix-mounts-plus-hal-mounts.diff to fix
+ https://bugzilla.novell.com/show_bug.cgi?id=183723. Our
+ gnome-vfs2-hal-mount.patch had removed the ability to mount certain
+ volumes through mount(8), instead of HAL. We need this for volumes
+ that don't have a HAL UDI, like NFS mounts listed in /etc/fstab.
* Tue Jun 13 2006 - gekker@suse.de
- Fix typo in hu translation (#183987)
* Tue Jun 13 2006 - federico@novell.com
++++++ gnome-vfs2-183723-unix-mounts-plus-hal-mounts.diff ++++++
2006-06-16 Federico Mena Quintero
Restore the ability to mount volumes with Unix mount(8),
instead of only using HAL. Fixes
https://bugzilla.novell.com/show_bug.cgi?id=183723
* libgnomevfs/gnome-vfs-volume-ops.c (mount_unmount_with_hal): New
function; moved the HAL code from mount_unmount_operation() to here.
(mount_unmount_with_unix_mount): Likewise, but for the Unix mounts
code.
(find_command): Restore function from the original, unpatched source.
(mount_unmount_operation): Just dispatch to the right function,
mount_unmount_with_hal() or mount_unmount_with_unix_mount(),
depending on whether we have a HAL UDI.
--- gnome-vfs/libgnomevfs/gnome-vfs-volume-ops.c.hal-only 2006-06-16 13:13:37.000000000 -0500
+++ gnome-vfs/libgnomevfs/gnome-vfs-volume-ops.c 2006-06-16 13:31:06.000000000 -0500
@@ -56,11 +56,7 @@ static const char *volrmmount_locations
#define UMOUNT_COMMAND volrmmount_locations
#define UMOUNT_SEPARATOR " -e "
-#elif USE_HAL
-
-static DBusConnection *dbus_ctx = NULL;
-
-#elif !G_OS_WIN32
+#elif !defined (G_OS_WIN32)
static const char *mount_known_locations [] = {
"/sbin/mount", "/bin/mount",
@@ -80,7 +76,27 @@ static const char *umount_known_location
#define UMOUNT_COMMAND umount_known_locations
#define UMOUNT_SEPARATOR " "
-#endif /* USE_VOLRMMOUNT */
+#endif /* USE_VOLRMMOUNT */
+
+
+#ifdef USE_HAL
+
+static DBusConnection *dbus_ctx = NULL;
+
+#endif
+
+/* Returns the full path to the queried command */
+static const char *
+find_command (const char **known_locations)
+{
+ int i;
+
+ for (i = 0; known_locations [i]; i++){
+ if (g_file_test (known_locations [i], G_FILE_TEST_IS_EXECUTABLE))
+ return known_locations [i];
+ }
+ return NULL;
+}
/* mount_unmount_operation() flags */
enum {
@@ -120,7 +136,7 @@ force_probe (void)
}
}
-#if !defined (USE_HAL) && !defined (G_OS_WIN32)
+#if !defined (G_OS_WIN32)
typedef struct {
char *argv[4];
@@ -342,7 +358,7 @@ mount_unmount_thread (void *arg)
return NULL;
}
-#endif /* !USE_HAL && !G_OS_WIN32 */
+#endif
struct dispatch_callback_closure {
gboolean succeeded;
@@ -434,19 +450,17 @@ uid_is_valid_option (DBusConnection *dbu
return retval;
}
-#endif
static void
-mount_unmount_operation (const char *mount_point,
- const char *device_path,
- const char *hal_udi,
- const char *filesystem_type,
- GnomeVFSDeviceType device_type,
- guint32 flags,
- GnomeVFSVolumeOpCallback callback,
- gpointer user_data)
+mount_unmount_with_hal (const char *mount_point,
+ const char *device_path,
+ const char *hal_udi,
+ const char *filesystem_type,
+ GnomeVFSDeviceType device_type,
+ guint32 flags,
+ GnomeVFSVolumeOpCallback callback,
+ gpointer user_data)
{
-#ifdef USE_HAL
DBusMessage *dmesg, *reply;
const char *method;
DBusError error;
@@ -531,8 +545,19 @@ mount_unmount_operation (const char *mou
exception:
dbus_error_free (&error);
-
-#elif !defined (G_OS_WIN32)
+}
+#endif
+
+static void
+mount_unmount_with_unix_mount (const char *mount_point,
+ const char *device_path,
+ const char *filesystem_type,
+ GnomeVFSDeviceType device_type,
+ guint32 flags,
+ GnomeVFSVolumeOpCallback callback,
+ gpointer user_data)
+{
+#if !defined (G_OS_WIN32)
const char *command = NULL;
const char *argument = NULL;
MountThreadInfo *mount_info;
@@ -550,16 +575,22 @@ mount_unmount_operation (const char *mou
#else
name = mount_point;
#endif /* USE_VOLRMOUNT */
-
+
+ if (flags & MOUNT) {
+ command = find_command (MOUNT_COMMAND);
+
#ifdef MOUNT_ARGUMENT
- if (operation == MOUNT)
argument = MOUNT_ARGUMENT;
#endif /* MOUNT_ARGUMENT */
+ }
+ if (flags & UNMOUNT) {
+ command = find_command (UMOUNT_COMMAND);
+
#ifdef UNMOUNT_ARGUMENT
- if (operation == UNMOUNT)
argument = UNMOUNT_ARGUMENT;
#endif /* UNMOUNT_ARGUMENT */
+ }
mount_info = g_new0 (MountThreadInfo, 1);
@@ -586,6 +617,29 @@ mount_unmount_operation (const char *mou
#endif
}
+static void
+mount_unmount_operation (const char *mount_point,
+ const char *device_path,
+ const char *hal_udi,
+ const char *filesystem_type,
+ GnomeVFSDeviceType device_type,
+ guint32 flags,
+ GnomeVFSVolumeOpCallback callback,
+ gpointer user_data)
+{
+#ifdef USE_HAL
+ if (hal_udi) {
+ mount_unmount_with_hal (mount_point, device_path, hal_udi, filesystem_type, device_type, flags,
+ callback, user_data);
+ } else {
+#endif
+ mount_unmount_with_unix_mount (mount_point, device_path, filesystem_type, device_type, flags,
+ callback, user_data);
+#ifdef USE_HAL
+ }
+#endif
+}
+
/* TODO: check if already mounted/unmounted, emit pre_unmount, check for mount types */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org