r20968 - in /desktop/unstable/gvfs/debian: changelog control control.in gvfs.install patches/03_xdg-mount.patch patches/series rules xdg-mount xdg-mount.pod
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Mon Aug 17 15:59:11 UTC 2009
Author: joss
Date: Mon Aug 17 15:59:10 2009
New Revision: 20968
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=20968
Log:
* xdg-mount: new utility, that will spawn gnome-mount or exo-mount
depending on the running environment.
* Depend on x11-utils for xprop.
* Recommend gnome-mount | exo-utils.
* Install the script and its manual page in gvfs.
* 03_xdg-mount.patch: new patch. Use xdg-mount instead of gnome-mount.
Handle its specific return code by displaying the appropriate error.
Added:
desktop/unstable/gvfs/debian/patches/03_xdg-mount.patch
desktop/unstable/gvfs/debian/xdg-mount
desktop/unstable/gvfs/debian/xdg-mount.pod
Modified:
desktop/unstable/gvfs/debian/changelog
desktop/unstable/gvfs/debian/control
desktop/unstable/gvfs/debian/control.in
desktop/unstable/gvfs/debian/gvfs.install
desktop/unstable/gvfs/debian/patches/series
desktop/unstable/gvfs/debian/rules
Modified: desktop/unstable/gvfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/changelog?rev=20968&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/changelog [utf-8] (original)
+++ desktop/unstable/gvfs/debian/changelog [utf-8] Mon Aug 17 15:59:10 2009
@@ -1,3 +1,15 @@
+gvfs (1.2.3-3) unstable; urgency=low
+
+ * xdg-mount: new utility, that will spawn gnome-mount or exo-mount
+ depending on the running environment.
+ * Depend on x11-utils for xprop.
+ * Recommend gnome-mount | exo-utils.
+ * Install the script and its manual page in gvfs.
+ * 03_xdg-mount.patch: new patch. Use xdg-mount instead of gnome-mount.
+ Handle its specific return code by displaying the appropriate error.
+
+ -- Josselin Mouette <joss at debian.org> Mon, 17 Aug 2009 17:39:43 +0200
+
gvfs (1.2.3-2) unstable; urgency=low
[ Josselin Mouette ]
Modified: desktop/unstable/gvfs/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/control?rev=20968&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/control [utf-8] (original)
+++ desktop/unstable/gvfs/debian/control [utf-8] Mon Aug 17 15:59:10 2009
@@ -36,8 +36,11 @@
Package: gvfs
Architecture: any
Depends: ${shlibs:Depends},
- ${misc:Depends}
-Recommends: dbus, hal (>= 0.5.10)
+ ${misc:Depends},
+ x11-utils
+Recommends: dbus,
+ hal (>= 0.5.10),
+ gnome-mount | exo-utils
Suggests: gvfs-backends
Conflicts: gvfs-backends (<< 1.0.2-2), libgvfscommon0
Replaces: libgvfscommon0
Modified: desktop/unstable/gvfs/debian/control.in
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/control.in?rev=20968&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/control.in [utf-8] (original)
+++ desktop/unstable/gvfs/debian/control.in [utf-8] Mon Aug 17 15:59:10 2009
@@ -36,8 +36,11 @@
Package: gvfs
Architecture: any
Depends: ${shlibs:Depends},
- ${misc:Depends}
-Recommends: dbus, hal (>= 0.5.10)
+ ${misc:Depends},
+ x11-utils
+Recommends: dbus,
+ hal (>= 0.5.10),
+ gnome-mount | exo-utils
Suggests: gvfs-backends
Conflicts: gvfs-backends (<< 1.0.2-2), libgvfscommon0
Replaces: libgvfscommon0
Modified: desktop/unstable/gvfs/debian/gvfs.install
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/gvfs.install?rev=20968&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/gvfs.install [utf-8] (original)
+++ desktop/unstable/gvfs/debian/gvfs.install [utf-8] Mon Aug 17 15:59:10 2009
@@ -14,3 +14,4 @@
debian/tmp/usr/share/gvfs/mounts/localtest.mount
debian/tmp/usr/share/gvfs/mounts/trash.mount
debian/tmp/usr/share/gvfs/remote-volume-monitors/hal.monitor
+debian/xdg-mount /usr/bin/
Added: desktop/unstable/gvfs/debian/patches/03_xdg-mount.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/03_xdg-mount.patch?rev=20968&op=file
==============================================================================
--- desktop/unstable/gvfs/debian/patches/03_xdg-mount.patch (added)
+++ desktop/unstable/gvfs/debian/patches/03_xdg-mount.patch [utf-8] Mon Aug 17 15:59:10 2009
@@ -1,0 +1,156 @@
+Index: gvfs-1.2.3/monitor/hal/ghaldrive.c
+===================================================================
+--- gvfs-1.2.3.orig/monitor/hal/ghaldrive.c 2009-08-17 17:21:34.882046406 +0200
++++ gvfs-1.2.3/monitor/hal/ghaldrive.c 2009-08-17 17:34:22.938039136 +0200
+@@ -546,9 +546,19 @@ spawn_cb (GPid pid, gint status, gpointe
+ if (WEXITSTATUS (status) != 0)
+ {
+ GError *error;
+- error = g_error_new_literal (G_IO_ERROR,
+- G_IO_ERROR_FAILED_HANDLED,
+- "You are not supposed to show G_IO_ERROR_FAILED_HANDLED in the UI");
++ if (WEXITSTATUS (status) == 7)
++ {
++ /* Special error code from xdg-mount */
++ error = g_error_new_literal (G_IO_ERROR,
++ G_IO_ERROR_FAILED,
++ "Mount helper program cannot be found");
++ }
++ else
++ {
++ error = g_error_new_literal (G_IO_ERROR,
++ G_IO_ERROR_FAILED_HANDLED,
++ "You are not supposed to show G_IO_ERROR_FAILED_HANDLED in the UI");
++ }
+ simple = g_simple_async_result_new_from_error (data->object,
+ data->callback,
+ data->user_data,
+@@ -578,9 +588,9 @@ g_hal_drive_eject_do (GDrive
+ SpawnOp *data;
+ GPid child_pid;
+ GError *error;
+- char *argv[] = {"gnome-mount", "-e", "-b", "-d", NULL, NULL};
++ char *argv[] = {"xdg-mount", "-e", "-d", NULL, NULL};
+
+- argv[4] = g_strdup (hal_drive->device_path);
++ argv[3] = g_strdup (hal_drive->device_path);
+
+ data = g_new0 (SpawnOp, 1);
+ data->object = g_object_ref (drive);
+@@ -613,7 +623,7 @@ g_hal_drive_eject_do (GDrive
+ else
+ g_child_watch_add (child_pid, spawn_cb, data);
+
+- g_free (argv[4]);
++ g_free (argv[3]);
+ }
+
+
+Index: gvfs-1.2.3/monitor/hal/ghalmount.c
+===================================================================
+--- gvfs-1.2.3.orig/monitor/hal/ghalmount.c 2009-08-17 17:25:04.965546684 +0200
++++ gvfs-1.2.3/monitor/hal/ghalmount.c 2009-08-17 17:28:39.494369460 +0200
+@@ -786,30 +786,31 @@ unmount_cb (GPid pid, gint status, gpoin
+
+ if (WEXITSTATUS (status) != 0)
+ {
++ GError *error;
+ if (data->using_legacy)
+ {
+- GError *error;
+ error = g_error_new_literal (G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ data->error_string->str);
+- simple = g_simple_async_result_new_from_error (data->object,
+- data->callback,
+- data->user_data,
+- error);
+- g_error_free (error);
++ }
++ else if (WEXITSTATUS (status) == 7)
++ {
++ /* Special exit code from xdg-mount */
++ error = g_error_new_literal (G_IO_ERROR,
++ G_IO_ERROR_FAILED,
++ "Mount helper program cannot be found");
+ }
+ else
+ {
+- GError *error;
+ error = g_error_new_literal (G_IO_ERROR,
+ G_IO_ERROR_FAILED_HANDLED,
+ "You are not supposed to show G_IO_ERROR_FAILED_HANDLED in the UI");
+- simple = g_simple_async_result_new_from_error (data->object,
+- data->callback,
+- data->user_data,
+- error);
+- g_error_free (error);
+ }
++ simple = g_simple_async_result_new_from_error (data->object,
++ data->callback,
++ data->user_data,
++ error);
++ g_error_free (error);
+ }
+ else
+ {
+@@ -922,7 +923,7 @@ g_hal_mount_unmount (GMount
+ gpointer user_data)
+ {
+ GHalMount *hal_mount = G_HAL_MOUNT (mount);
+- char *argv[] = {"gnome-mount", "-u", "-b", "-d", NULL, NULL};
++ char *argv[] = {"xdg-mount", "-u", "-d", NULL, NULL};
+ gboolean using_legacy = FALSE;
+ char *d, *m;
+
+@@ -930,7 +931,7 @@ g_hal_mount_unmount (GMount
+ m = g_strdup (hal_mount->mount_path);
+
+ if (hal_mount->device != NULL)
+- argv[4] = d;
++ argv[3] = d;
+ else
+ {
+ using_legacy = TRUE;
+Index: gvfs-1.2.3/monitor/hal/ghalvolume.c
+===================================================================
+--- gvfs-1.2.3.orig/monitor/hal/ghalvolume.c 2009-08-17 17:12:32.542043632 +0200
++++ gvfs-1.2.3/monitor/hal/ghalvolume.c 2009-08-17 17:34:37.750039187 +0200
+@@ -702,9 +702,19 @@ spawn_cb (GPid pid, gint status, gpointe
+ if (WEXITSTATUS (status) != 0)
+ {
+ GError *error;
+- error = g_error_new_literal (G_IO_ERROR,
+- G_IO_ERROR_FAILED_HANDLED,
+- "You are not supposed to show G_IO_ERROR_FAILED_HANDLED in the UI");
++ if (WEXITSTATUS (status) == 7)
++ {
++ /* Special exit code from xdg-mount */
++ error = g_error_new_literal (G_IO_ERROR,
++ G_IO_ERROR_FAILED,
++ "Mount helper program cannot be found");
++ }
++ else
++ {
++ error = g_error_new_literal (G_IO_ERROR,
++ G_IO_ERROR_FAILED_HANDLED,
++ "You are not supposed to show G_IO_ERROR_FAILED_HANDLED in the UI");
++ }
+ simple = g_simple_async_result_new_from_error (data->object,
+ data->callback,
+ data->user_data,
+@@ -816,11 +826,11 @@ g_hal_volume_mount (GVolume
+ }
+ else
+ {
+- char *argv[] = {"gnome-mount", "-b", "-d", NULL, NULL, NULL};
+- argv[3] = hal_volume->device_path;
++ char *argv[] = {"xdg-mount", "-d", NULL, NULL, NULL};
++ argv[2] = hal_volume->device_path;
+ /* ask for no dialogs if mount_operation is NULL */
+ if (mount_operation == NULL)
+- argv[4] = "-n";
++ argv[3] = "-n";
+ spawn_do (volume, cancellable, callback, user_data, argv);
+ }
+ }
Modified: desktop/unstable/gvfs/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/series?rev=20968&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gvfs/debian/patches/series [utf-8] Mon Aug 17 15:59:10 2009
@@ -1,5 +1,6 @@
01_maintainer_mode.patch
02_deprecated.patch
+03_xdg-mount.patch
10_kfreebsd.patch
90_relibtoolize.patch
99_ltmain_as-needed.patch
Modified: desktop/unstable/gvfs/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/rules?rev=20968&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/rules [utf-8] (original)
+++ desktop/unstable/gvfs/debian/rules [utf-8] Mon Aug 17 15:59:10 2009
@@ -17,6 +17,13 @@
FUSE_ARCHES := $(shell type-handling any linux,kfreebsd)
+MANPAGES += $(patsubst %.pod,%.1,$(wildcard debian/*.pod))
+DEB_INSTALL_MANPAGES_gvfs += $(MANPAGES)
+
+%.1: %.pod
+ pod2man --release="Gvfs $(DEB_UPSTREAM_VERSION)" \
+ --center="Debian GNU/Linux" $< $@
+
ifeq ($(DEB_HOST_ARCH_OS),linux)
install/gvfs-backends::
# Those are only available on Linux:
@@ -24,5 +31,8 @@
dh_install -pgvfs-backends debian/tmp/usr/share/gvfs/mounts/obexftp.mount
endif
+common-build-arch:: $(MANPAGES)
+
clean::
sed -i 's/@FUSE_ARCHES@/$(FUSE_ARCHES)/' debian/control
+ rm -f $(MANPAGES)
Added: desktop/unstable/gvfs/debian/xdg-mount
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/xdg-mount?rev=20968&op=file
==============================================================================
--- desktop/unstable/gvfs/debian/xdg-mount (added)
+++ desktop/unstable/gvfs/debian/xdg-mount [utf-8] Mon Aug 17 15:59:10 2009
@@ -1,0 +1,33 @@
+#! /bin/sh
+set -e
+
+if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
+elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
+elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+fi
+
+case "$DE" in
+ gnome)
+ if [ -x "`which gnome-mount 2>/dev/null`" ]; then
+ exec gnome-mount -b "$@"
+ fi
+ echo "gnome-mount cannot be found" >&2
+ exit 7
+ ;;
+ xfce)
+ if [ -x "`which exo-mount 2>/dev/null`" ]; then
+ exec exo-mount "$@"
+ fi
+ echo "exo-mount cannot be found" >&2
+ exit 7
+ ;;
+ *)
+ if [ -x "`which gnome-mount 2>/dev/null`" ]; then
+ exec gnome-mount -b "$@"
+ elif [ -x "`which exo-mount 2>/dev/null`" ]; then
+ exec exo-mount "$@"
+ fi
+ echo "no mount utility could be found" >&2
+ exit 7
+ ;;
+esac
Added: desktop/unstable/gvfs/debian/xdg-mount.pod
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/xdg-mount.pod?rev=20968&op=file
==============================================================================
--- desktop/unstable/gvfs/debian/xdg-mount.pod (added)
+++ desktop/unstable/gvfs/debian/xdg-mount.pod [utf-8] Mon Aug 17 15:59:10 2009
@@ -1,0 +1,54 @@
+=head1 NAME
+
+xdg-mount - mount volumes using B<HAL>, with the B<GNOME> or B<Xfce> tools
+
+=head1 SYNOPSIS
+
+B<xdg-mount> [--help] [-d I</dev/file>|-h I</org/freedesktop/Hal/udi>]
+[--eject|--unmount] [--no-ui]
+
+=head1 DESCRIPTION
+
+B<xdg-mount> is a wrapper script that will call B<gnome-mount> or
+B<exo-mount> depending on the desktop environment.
+
+=head1 OPTIONS
+
+The following options are understood regardless of the current
+environment.
+
+=over 4
+
+=item B<-?>, B<--help>
+
+Show help options and exit
+
+=item B<-d>, B<--device-file>
+
+Specify the volume to mount by the path to the device file
+
+=item B<-h>, B<--hal-udi>
+
+Specify the volume to mount by its B<HAL> Unique Device Identifier
+
+=item B<-e>, B<--eject>
+
+Eject the volume rather than mounting
+
+=item B<-u>, B<--unmount>
+
+Unmount the volume rather than mounting
+
+=item B<-n>, B<--no-ui>
+
+Do not show the dialogs that may be required for authentication
+
+=back
+
+=head1 SEE ALSO
+
+B<gnome-mount>(1), B<exo-mount>(1).
+
+=head1 AUTHORS
+
+Josselin Mouette <joss at debian.org>
More information about the pkg-gnome-commits
mailing list