Bug#699814: unblock: gvfs/1.12.3-4
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package gvfs to work around a RC bug.
gvfs (1.12.3-4) unstable; urgency=low
* 06_metadata_nfs.patch: new patch. Disable gvfsd-metadata entirely on
remote filesystems. It is better to miss functionality than to
hammer the server. Closes: #624507.
unblock gvfs/1.12.3-4
Thanks,
--
.''`. Josselin Mouette
: :' :
`. `'
`-
Index: gvfs-1.12.3/metadata/meta-daemon.c
===================================================================
--- gvfs-1.12.3.orig/metadata/meta-daemon.c 2013-02-05 15:27:50.107139266 +0100
+++ gvfs-1.12.3/metadata/meta-daemon.c 2013-02-05 15:29:47.563713526 +0100
@@ -25,6 +25,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
+#include <gio/gio.h>
#include <locale.h>
#include <stdlib.h>
#include <dbus/dbus.h>
@@ -681,6 +682,34 @@ static struct DBusObjectPathVTable metad
metadata_message
};
+static gboolean
+home_is_remote (void)
+{
+ GFile *homedir = g_file_new_for_path (g_get_home_dir ());
+ GFileInfo *info = g_file_query_filesystem_info (homedir,
+ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE,
+ NULL, NULL);
+ gboolean retval = FALSE;
+
+ if (info)
+ {
+ const char *fstype = g_file_info_get_attribute_string (info,
+ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
+ if (fstype && (g_str_has_prefix (fstype, "nfs") ||
+ g_str_has_prefix (fstype, "smb") ||
+ g_str_equal (fstype, "cifs") ||
+ g_str_equal (fstype, "9p") ||
+ g_str_equal (fstype, "ceph") ||
+ g_str_equal (fstype, "coda") ||
+ g_str_has_prefix (fstype, "ocfs") ||
+ g_str_has_prefix (fstype, "gfs")))
+ retval = TRUE;
+ g_object_unref (info);
+ }
+ g_object_unref (homedir);
+ return retval;
+}
+
int
main (int argc, char *argv[])
{
@@ -729,6 +758,12 @@ main (int argc, char *argv[])
g_type_init ();
+ if (home_is_remote ())
+ {
+ g_printerr ("Remote filesystem detected, shutting down.\n");
+ return 1;
+ }
+
loop = g_main_loop_new (NULL, FALSE);
dbus_error_init (&derror);
Reply to: