rpms/gvfs/devel fix-mounting.patch,NONE,1.1 gvfs.spec,1.84,1.85

Matthias Clasen mclasen at fedoraproject.org
Mon Sep 29 17:33:58 UTC 2008


Author: mclasen

Update of /cvs/extras/rpms/gvfs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10861

Modified Files:
	gvfs.spec 
Added Files:
	fix-mounting.patch 
Log Message:
fix mounting problems


fix-mounting.patch:

--- NEW FILE fix-mounting.patch ---
diff -up gvfs-1.0.1/monitor/hal/ghalvolume.c.fix-mounting gvfs-1.0.1/monitor/hal/ghalvolume.c
--- gvfs-1.0.1/monitor/hal/ghalvolume.c.fix-mounting	2008-09-10 11:51:23.000000000 -0400
+++ gvfs-1.0.1/monitor/hal/ghalvolume.c	2008-09-29 12:16:02.000000000 -0400
@@ -760,9 +760,10 @@ spawn_cb (GPid pid, gint status, gpointe
   GSimpleAsyncResult *simple;
 
   /* ensure that the #GHalMount corrosponding to the #GHalVolume we've
-   * mounted is made available before returning to the user
+   * mounted is made available before returning to the user (make sure
+   * we don't emit the signals in idle; see #552168).
    */
-  g_hal_volume_monitor_force_update (G_HAL_VOLUME_MONITOR (G_HAL_VOLUME (data->object)->volume_monitor));
+  g_hal_volume_monitor_force_update (G_HAL_VOLUME_MONITOR (G_HAL_VOLUME (data->object)->volume_monitor), FALSE);
 
   if (WEXITSTATUS (status) != 0)
     {
diff -up gvfs-1.0.1/monitor/hal/ghalvolumemonitor.c.fix-mounting gvfs-1.0.1/monitor/hal/ghalvolumemonitor.c
--- gvfs-1.0.1/monitor/hal/ghalvolumemonitor.c.fix-mounting	2008-09-10 11:51:13.000000000 -0400
+++ gvfs-1.0.1/monitor/hal/ghalvolumemonitor.c	2008-09-29 12:16:02.000000000 -0400
@@ -82,7 +82,8 @@ static void hal_changed              (Ha
                                       HalDevice  *device,
                                       gpointer    user_data);
 static void update_all               (GHalVolumeMonitor *monitor,
-                                      gboolean emit_changes);
+                                      gboolean emit_changes,
+                                      gboolean emit_in_idle);
 static void update_drives            (GHalVolumeMonitor *monitor,
                                       GList **added_drives,
                                       GList **removed_drives);
@@ -367,7 +368,7 @@ mountpoints_changed (GUnixMountMonitor *
 {
   GHalVolumeMonitor *monitor = G_HAL_VOLUME_MONITOR (user_data);
 
-  update_all (monitor, TRUE);
+  update_all (monitor, TRUE, TRUE);
 }
 
 static void
@@ -376,13 +377,13 @@ mounts_changed (GUnixMountMonitor *mount
 {
   GHalVolumeMonitor *monitor = G_HAL_VOLUME_MONITOR (user_data);
 
-  update_all (monitor, TRUE);
+  update_all (monitor, TRUE, TRUE);
 }
 
 void 
-g_hal_volume_monitor_force_update (GHalVolumeMonitor *monitor)
+g_hal_volume_monitor_force_update (GHalVolumeMonitor *monitor, gboolean emit_in_idle)
 {
-  update_all (monitor, TRUE);
+  update_all (monitor, TRUE, emit_in_idle);
 }
 
 static void
@@ -394,7 +395,7 @@ hal_changed (HalPool    *pool,
   
   /*g_warning ("hal changed");*/
   
-  update_all (monitor, TRUE);
+  update_all (monitor, TRUE, TRUE);
 }
 
 static GObject *
@@ -448,7 +449,7 @@ g_hal_volume_monitor_constructor (GType 
                     "device_removed", G_CALLBACK (hal_changed),
                     monitor);
 		    
-  update_all (monitor, FALSE);
+  update_all (monitor, FALSE, TRUE);
 
   G_LOCK (hal_vm);
   the_volume_monitor = monitor;
@@ -973,7 +974,8 @@ emit_lists_in_idle (gpointer data)
 /* Must be called from idle if emit_changes, with no locks held */
 static void
 update_all (GHalVolumeMonitor *monitor,
-            gboolean emit_changes)
+            gboolean emit_changes,
+            gboolean emit_in_idle)
 {
   ChangedLists *lists;
   GList *added_drives, *removed_drives;
@@ -1007,7 +1009,10 @@ update_all (GHalVolumeMonitor *monitor,
       lists->added_mounts = added_mounts;
       lists->removed_mounts = removed_mounts;
       
-      g_idle_add (emit_lists_in_idle, lists);
+      if (emit_in_idle)
+        g_idle_add (emit_lists_in_idle, lists);
+      else
+        emit_lists_in_idle (lists);
     }
   else
     {
diff -up gvfs-1.0.1/monitor/hal/ghalvolumemonitor.h.fix-mounting gvfs-1.0.1/monitor/hal/ghalvolumemonitor.h
--- gvfs-1.0.1/monitor/hal/ghalvolumemonitor.h.fix-mounting	2008-09-10 11:51:13.000000000 -0400
+++ gvfs-1.0.1/monitor/hal/ghalvolumemonitor.h	2008-09-29 12:16:02.000000000 -0400
@@ -51,7 +51,8 @@ struct _GHalVolumeMonitorClass {
 GType g_hal_volume_monitor_get_type (void) G_GNUC_CONST;
 
 GVolumeMonitor *g_hal_volume_monitor_new                          (void);
-void            g_hal_volume_monitor_force_update                 (GHalVolumeMonitor *monitor);
+void            g_hal_volume_monitor_force_update                 (GHalVolumeMonitor *monitor,
+                                                                   gboolean emit_in_idle);
 
 G_END_DECLS
 
diff -up gvfs-1.0.1/monitor/proxy/gproxyvolume.c.fix-mounting gvfs-1.0.1/monitor/proxy/gproxyvolume.c
--- gvfs-1.0.1/monitor/proxy/gproxyvolume.c.fix-mounting	2008-09-29 13:26:28.000000000 -0400
+++ gvfs-1.0.1/monitor/proxy/gproxyvolume.c	2008-09-29 13:26:44.000000000 -0400
@@ -539,7 +539,7 @@ mount_cb (DBusMessage *reply,
                                         data->callback,
                                         data->user_data,
                                         NULL);
-  g_simple_async_result_complete (simple);
+  g_simple_async_result_complete_in_idle (simple);
   g_object_unref (simple);
 
   g_object_unref (data->object);


Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/devel/gvfs.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- gvfs.spec	29 Sep 2008 09:25:19 -0000	1.84
+++ gvfs.spec	29 Sep 2008 17:33:28 -0000	1.85
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -32,6 +32,9 @@
 
 Patch2: gvfs-obexftp-updated-apis-3.patch
 
+# From upstream svn
+Patch3: fix-mounting.patch
+
 %description
 The gvfs package provides backend implementations for the gio 
 framework in GLib. It includes ftp, sftp, cifs. 
@@ -114,6 +117,7 @@
 %setup -q
 %patch1 -p0 -b .archive-integration
 %patch2 -p0 -b .bluez-ods
+%patch3 -p1 -b .fix-mounting
 
 %build
 
@@ -251,6 +255,9 @@
 
 
 %changelog
+* Mon Sep 29 2008 Matthias Clasen <mclasen at redhat.com>  - 1.0.1-3
+- Fix mounting
+
 * Mon Sep 29 2008 - Bastien Nocera <bnocera at redhat.com> - 1.0.1-2
 - Update obexftp patch from upstream
 




More information about the fedora-extras-commits mailing list