* [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-vfs/files: gnome-vfs-2.20.0-home_dir_fakeroot.patch digest-gnome-vfs-2.20.1-r1 gnome-vfs-2.14.2-http_module-undef-neon-symbols.patch digest-gnome-vfs-2.16.3-r1 gnome-vfs-2.16.3-empty-desktop-entry-Path.diff gnome-vfs-2.16.3-fbsd.patch gnome-vfs-2-CAN-2005-0706.patch
@ 2008-01-16 22:42 Gilles Dartiguelongue (eva)
0 siblings, 0 replies; only message in thread
From: Gilles Dartiguelongue (eva) @ 2008-01-16 22:42 UTC (permalink / raw
To: gentoo-commits
eva 08/01/16 22:42:11
Added: gnome-vfs-2.20.0-home_dir_fakeroot.patch
digest-gnome-vfs-2.20.1-r1
Removed:
gnome-vfs-2.14.2-http_module-undef-neon-symbols.patch
digest-gnome-vfs-2.16.3-r1
gnome-vfs-2.16.3-empty-desktop-entry-Path.diff
gnome-vfs-2.16.3-fbsd.patch
gnome-vfs-2-CAN-2005-0706.patch
Log:
fix bug #200897 and cleanup old revisions and patches
(Portage version: 2.1.4_rc14)
Revision Changes Path
1.1 gnome-base/gnome-vfs/files/gnome-vfs-2.20.0-home_dir_fakeroot.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-vfs/files/gnome-vfs-2.20.0-home_dir_fakeroot.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-vfs/files/gnome-vfs-2.20.0-home_dir_fakeroot.patch?rev=1.1&content-type=text/plain
Index: gnome-vfs-2.20.0-home_dir_fakeroot.patch
===================================================================
Index: gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-application-registry.c
===================================================================
--- gnome-vfs-2.20.0.orig/libgnomevfs/gnome-vfs-application-registry.c 2007-01-03 07:50:44.000000000 +0100
+++ gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-application-registry.c 2007-10-11 10:13:16.429551115 +0200
@@ -965,7 +965,7 @@
NULL);
gnome_registry_dir.system_dir = TRUE;
- user_registry_dir.dirname = g_build_filename (g_get_home_dir(),
+ user_registry_dir.dirname = g_build_filename (gnome_vfs_get_home_dir(),
".gnome",
"application-info",
NULL);
Index: gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-init.c
===================================================================
--- gnome-vfs-2.20.0.orig/libgnomevfs/gnome-vfs-init.c 2007-03-05 10:05:05.000000000 +0100
+++ gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-init.c 2007-10-11 10:13:16.429551115 +0200
@@ -59,29 +59,6 @@
static GPrivate * private_is_primary_thread;
-static gboolean
-ensure_dot_gnome_exists (void)
-{
- gboolean retval = TRUE;
- gchar *dirname;
-
- dirname = g_build_filename (g_get_home_dir (), ".gnome2", NULL);
-
- if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) {
- if (g_mkdir (dirname, S_IRWXU) != 0) {
- g_warning ("Unable to create ~/.gnome2 directory: %s",
- g_strerror (errno));
- retval = FALSE;
- }
- } else if (!g_file_test (dirname, G_FILE_TEST_IS_DIR)) {
- g_warning ("Error: ~/.gnome2 must be a directory.");
- retval = FALSE;
- }
-
- g_free (dirname);
- return retval;
-}
-
static void
gnome_vfs_thread_init (void)
{
@@ -112,7 +89,8 @@
char *bogus_argv[2] = { "dummy", NULL };
*/
- if (!ensure_dot_gnome_exists ()) {
+ /* The first call also checks that ~/.gnome2 is writable. */
+ if (!gnome_vfs_get_home_dir ()) {
return FALSE;
}
Index: gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-private-utils.c
===================================================================
--- gnome-vfs-2.20.0.orig/libgnomevfs/gnome-vfs-private-utils.c 2007-01-03 07:50:44.000000000 +0100
+++ gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-private-utils.c 2007-10-11 10:14:48.814815851 +0200
@@ -1086,3 +1086,54 @@
}
#endif
+static gboolean
+ensure_dot_gnome_exists (gchar *home_dir)
+{
+ gboolean retval = TRUE;
+ gchar *dirname;
+
+ dirname = g_build_filename (home_dir, ".gnome2", NULL);
+
+ if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) {
+ if (g_mkdir (dirname, S_IRWXU) != 0) {
+ g_warning ("Unable to create ~/.gnome2 directory: %s",
+ g_strerror (errno));
+ retval = FALSE;
+ }
+ } else if (!g_file_test (dirname, G_FILE_TEST_IS_DIR)) {
+ g_warning ("Error: ~/.gnome2 must be a directory.");
+ retval = FALSE;
+ }
+
+ g_free (dirname);
+ return retval;
+}
+
+/**
+ * gnome_vfs_get_home_dir:
+ *
+ * If ~/.gnome2 is writable, return the home directory
+ * Otherwise, return the contents of the HOME environment variable
+ *
+ * Return value: home directory if successful, NULL otherwise.
+ * Do not free the value returned.
+ */
+const gchar *
+gnome_vfs_get_home_dir (void)
+{
+ static gchar *home = NULL;
+
+ if (home == NULL) {
+ gchar *tmp = g_get_home_dir ();
+ if (ensure_dot_gnome_exists (tmp)) {
+ home = g_strdup (tmp);
+ } else {
+ gchar *tmp2 = g_getenv ("HOME");
+ if (!g_str_equal (tmp, tmp2) && ensure_dot_gnome_exists (tmp2)) {
+ home = g_strdup (tmp2);
+ }
+ }
+ }
+
+ return home;
+}
Index: gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-private-utils.h
===================================================================
--- gnome-vfs-2.20.0.orig/libgnomevfs/gnome-vfs-private-utils.h 2007-01-03 07:50:44.000000000 +0100
+++ gnome-vfs-2.20.0/libgnomevfs/gnome-vfs-private-utils.h 2007-10-11 10:13:16.433551342 +0200
@@ -124,6 +124,8 @@
#endif
+const gchar *gnome_vfs_get_home_dir (void);
+
G_END_DECLS
#endif /* _GNOME_VFS_PRIVATE_UTILS_H */
Index: gnome-vfs-2.20.0/modules/file-method.c
===================================================================
--- gnome-vfs-2.20.0.orig/modules/file-method.c 2007-10-11 10:13:16.345546327 +0200
+++ gnome-vfs-2.20.0/modules/file-method.c 2007-10-11 10:13:16.433551342 +0200
@@ -1536,7 +1536,7 @@
GList *p;
char *buffer, *escaped_path, *escaped_mount_point;
- cache_file_parent = append_to_path (g_get_home_dir (), TRASH_ENTRY_CACHE_PARENT);
+ cache_file_parent = append_to_path (gnome_vfs_get_home_dir (), TRASH_ENTRY_CACHE_PARENT);
cache_file_path = append_to_path (cache_file_parent, TRASH_ENTRY_CACHE_NAME);
if (mkdir_recursive (cache_file_parent, 0777) != 0) {
@@ -1675,7 +1675,7 @@
cached_trash_directories = NULL;
/* read in the entries from disk */
- cache_file_path = g_build_filename (g_get_home_dir (),
+ cache_file_path = g_build_filename (gnome_vfs_get_home_dir (),
TRASH_ENTRY_CACHE_PARENT,
TRASH_ENTRY_CACHE_NAME,
NULL);
@@ -1947,7 +1947,7 @@
return GNOME_VFS_ERROR_INVALID_URI;
/* We will need the URI and the stat structure for the home directory. */
- home_directory = g_get_home_dir ();
+ home_directory = gnome_vfs_get_home_dir ();
if (gnome_vfs_context_check_cancellation (context)) {
g_free (full_name_near);
1.1 gnome-base/gnome-vfs/files/digest-gnome-vfs-2.20.1-r1
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-vfs/files/digest-gnome-vfs-2.20.1-r1?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-vfs/files/digest-gnome-vfs-2.20.1-r1?rev=1.1&content-type=text/plain
Index: digest-gnome-vfs-2.20.1-r1
===================================================================
MD5 a350a5a3e201951d7e7867d0900df423 gnome-vfs-2.20.1.tar.bz2 1890300
RMD160 faa5fffb5495d1e161cb6c3b47612cf39cbb1629 gnome-vfs-2.20.1.tar.bz2 1890300
SHA256 37475d17350b0e54b2e0b7bdcd7effd04eafd96b4b07604ff7d941377dd112d3 gnome-vfs-2.20.1.tar.bz2 1890300
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-01-16 22:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 22:42 [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-vfs/files: gnome-vfs-2.20.0-home_dir_fakeroot.patch digest-gnome-vfs-2.20.1-r1 gnome-vfs-2.14.2-http_module-undef-neon-symbols.patch digest-gnome-vfs-2.16.3-r1 gnome-vfs-2.16.3-empty-desktop-entry-Path.diff gnome-vfs-2.16.3-fbsd.patch gnome-vfs-2-CAN-2005-0706.patch Gilles Dartiguelongue (eva)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox