rpms/gvfs/devel gvfs-gphoto-automount.patch, NONE, 1.1 gvfs-unmount-scheme.patch, NONE, 1.1 gvfs.spec, 1.44, 1.45
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Thu Apr 17 03:35:04 UTC 2008
Author: mclasen
Update of /cvs/extras/rpms/gvfs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31945
Modified Files:
gvfs.spec
Added Files:
gvfs-gphoto-automount.patch gvfs-unmount-scheme.patch
Log Message:
Reenable gphoto automounting
gvfs-gphoto-automount.patch:
--- NEW FILE gvfs-gphoto-automount.patch ---
diff -up gvfs-0.2.3/hal/ghalvolume.c.gphoto-automount gvfs-0.2.3/hal/ghalvolume.c
--- gvfs-0.2.3/hal/ghalvolume.c.gphoto-automount 2008-04-16 23:32:31.000000000 -0400
+++ gvfs-0.2.3/hal/ghalvolume.c 2008-04-16 23:32:39.000000000 -0400
@@ -519,10 +519,6 @@ g_hal_volume_new (GVolumeMonitor *volu
if (foreign_mount_root == NULL)
return NULL;
-
- /* We don't want to automount cameras as the gphoto backend
- blocks access from other apps */
- ignore_automount = TRUE;
}
#endif
else
gvfs-unmount-scheme.patch:
--- NEW FILE gvfs-unmount-scheme.patch ---
--- trunk/programs/gvfs-mount.c 2008/04/02 19:51:01 1720
+++ trunk/programs/gvfs-mount.c 2008/04/07 19:50:52 1726
@@ -43,11 +43,13 @@
static gboolean mount_unmount = FALSE;
static gboolean mount_list = FALSE;
static gboolean mount_list_info = FALSE;
+static const char *unmount_scheme = NULL;
-static GOptionEntry entries[] =
+static const GOptionEntry entries[] =
{
{ "mountable", 'm', 0, G_OPTION_ARG_NONE, &mount_mountable, "Mount as mountable", NULL },
{ "unmount", 'u', 0, G_OPTION_ARG_NONE, &mount_unmount, "Unmount", NULL},
+ { "unmount-scheme", 's', 0, G_OPTION_ARG_STRING, &unmount_scheme, "Unmount all mounts with the given scheme", NULL},
{ "list", 'l', 0, G_OPTION_ARG_NONE, &mount_list, "List", NULL},
{ "list-info", 'i', 0, G_OPTION_ARG_NONE, &mount_list_info, "List extra information", NULL},
{ NULL }
@@ -502,6 +504,34 @@
g_list_free (mounts);
}
+static void
+unmount_all_with_scheme (const char *scheme)
+{
+ GVolumeMonitor *volume_monitor;
+ GList *mounts;
+ GList *l;
+
+ volume_monitor = g_volume_monitor_get();
+
+ /* populate gvfs network mounts */
+ iterate_gmain();
+
+ mounts = g_volume_monitor_get_mounts (volume_monitor);
+ for (l = mounts; l != NULL; l = l->next) {
+ GMount *mount = G_MOUNT (l->data);
+ GFile *root;
+
+ root = g_mount_get_root (mount);
+ if (g_file_has_uri_scheme (root, scheme)) {
+ unmount (root);
+ }
+ g_object_unref (root);
+ }
+ g_list_foreach (mounts, (GFunc)g_object_unref, NULL);
+ g_list_free (mounts);
+
+}
+
int
main (int argc, char *argv[])
{
@@ -523,6 +553,10 @@
if (mount_list)
list_monitor_items ();
+ else if (unmount_scheme != NULL)
+ {
+ unmount_all_with_scheme (unmount_scheme);
+ }
else if (argc > 1)
{
int i;
Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/devel/gvfs.spec,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- gvfs.spec 17 Apr 2008 02:56:10 -0000 1.44
+++ gvfs.spec 17 Apr 2008 03:34:27 -0000 1.45
@@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 0.2.3
-Release: 5%{?dist}
+Release: 6%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -38,6 +38,8 @@
Patch3: regexxer-crash.patch
Patch4: gvfs-0.2.2-only-show-allowed-mounts.patch
Patch5: gphoto-unmount-hang.patch
+Patch6: gvfs-gphoto-automount.patch
+Patch7: gvfs-unmount-scheme.patch
%description
The gvfs package provides backend implementations for the gio
@@ -71,6 +73,8 @@
%patch3 -p1 -b .regexxer-crash
%patch4 -p0 -b .only-show-allowed-mounts
%patch5 -p1 -b .gphoto-unmount-hang
+%patch6 -p1 -b .gphoto-automount
+%patch7 -p1 -b .unmount-scheme
%build
@@ -184,6 +188,10 @@
%changelog
+* Wed Apr 16 2008 Matthias Clasen <mclasen at redhat.com> - 0.2.3-6
+- Reenable gphoto automounting
+- Support unmounting all mounts for a scheme
+
* Wed Apr 16 2008 Matthias Clasen <mclasen at redhat.com> - 0.2.3-5
- Fix hangs when unmounting gphoto mounts
More information about the fedora-extras-commits
mailing list