Date: Saturday, April 9, 2016 @ 10:30:09 Author: bgyorgy Revision: 169806
archrelease: copy trunk to community-i686, community-x86_64 Deleted: nemo/repos/community-i686/deep-count-one-filesystem.patch nemo/repos/community-x86_64/deep-count-one-filesystem.patch --------------------------------------------------+ community-i686/deep-count-one-filesystem.patch | 120 --------------------- community-x86_64/deep-count-one-filesystem.patch | 120 --------------------- 2 files changed, 240 deletions(-) Deleted: community-i686/deep-count-one-filesystem.patch =================================================================== --- community-i686/deep-count-one-filesystem.patch 2016-04-09 08:30:00 UTC (rev 169805) +++ community-i686/deep-count-one-filesystem.patch 2016-04-09 08:30:09 UTC (rev 169806) @@ -1,120 +0,0 @@ -From fe1f9cd21b521a5f2a89aa6be105fb1af86406b9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <[email protected]> -Date: Sun, 31 Jan 2016 07:56:28 +0100 -Subject: [PATCH] directory: limit deep scount (folder contents and size) to - one filesystem When getting the size of the root directory, nemo was - descending into other filesystems including /proc, causing it to report - nonsensical sizes. Store the fsid of the starting directory, and do not - recurse into other mount points. - -https://bugzilla.gnome.org/show_bug.cgi?id=629394 -https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/585472 - -Based on Nautilus commit: -https://git.gnome.org/browse/nautilus/commit/?id=a645da5f1043c59203fd194fe85b6976d75d2ece - -Original author: Phillip Susi <[email protected]> - -Fixes issue #1050. ---- - libnemo-private/nemo-directory-async.c | 45 ++++++++++++++++++++++++++++++---- - 1 file changed, 40 insertions(+), 5 deletions(-) - -diff --git a/libnemo-private/nemo-directory-async.c b/libnemo-private/nemo-directory-async.c -index 856ab0f..14c7026 100644 ---- a/libnemo-private/nemo-directory-async.c -+++ b/libnemo-private/nemo-directory-async.c -@@ -134,6 +134,7 @@ struct DeepCountState { - GFile *deep_count_location; - GList *deep_count_subdirectories; - GArray *seen_deep_count_inodes; -+ char *fs_id; - }; - - -@@ -2666,6 +2667,7 @@ deep_count_one (DeepCountState *state, - NemoFile *file; - GFile *subdir; - gboolean is_seen_inode; -+ const char *id; - gboolean hidden; - is_seen_inode = seen_inode (state, info); - if (!is_seen_inode) { -@@ -2684,10 +2686,13 @@ deep_count_one (DeepCountState *state, - file->details->deep_directory_count += 1; - } - /* Record the fact that we have to descend into this directory. */ -- -- subdir = g_file_get_child (state->deep_count_location, g_file_info_get_name (info)); -- state->deep_count_subdirectories = g_list_prepend -- (state->deep_count_subdirectories, subdir); -+ id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM); -+ if (g_strcmp0 (id, state->fs_id) == 0) { -+ /* only if it is on the same filesystem */ -+ subdir = g_file_get_child (state->deep_count_location, g_file_info_get_name (info)); -+ state->deep_count_subdirectories = g_list_prepend -+ (state->deep_count_subdirectories, subdir); -+ } - } else { - /* Even non-regular files count as files. */ - if (hidden) { -@@ -2719,6 +2724,7 @@ deep_count_state_free (DeepCountState *state) - } - g_list_free_full (state->deep_count_subdirectories, g_object_unref); - g_array_free (state->seen_deep_count_inodes, TRUE); -+ g_free (state->fs_id); - g_free (state); - } - -@@ -2865,6 +2871,7 @@ deep_count_load (DeepCountState *state, GFile *location) - G_FILE_ATTRIBUTE_STANDARD_SIZE "," - G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "," - G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "," -+ G_FILE_ATTRIBUTE_ID_FILESYSTEM "," - G_FILE_ATTRIBUTE_UNIX_INODE, - G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, /* flags */ - G_PRIORITY_LOW, /* prio */ -@@ -2896,6 +2903,27 @@ deep_count_stop (NemoDirectory *directory) - } - - static void -+deep_count_got_info (GObject *source_object, -+ GAsyncResult *res, -+ gpointer user_data) -+{ -+ GFileInfo *info; -+ const char *id; -+ GFile *file = (GFile *)source_object; -+ DeepCountState *state = (DeepCountState *)user_data; -+ -+ info = g_file_query_info_finish (file, -+ res, -+ NULL); -+ if (info) { -+ id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM); -+ state->fs_id = g_strdup (id); -+ g_object_unref (info); -+ } -+ deep_count_load (state, file); -+} -+ -+static void - deep_count_start (NemoDirectory *directory, - NemoFile *file, - gboolean *doing_io) -@@ -2943,7 +2971,14 @@ deep_count_start (NemoDirectory *directory, - directory->details->deep_count_in_progress = state; - - location = nemo_file_get_location (file); -- deep_count_load (state, location); -+ state->fs_id = NULL; -+ g_file_query_info_async (location, -+ G_FILE_ATTRIBUTE_ID_FILESYSTEM, -+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, -+ G_PRIORITY_DEFAULT, -+ NULL, -+ deep_count_got_info, -+ state); - g_object_unref (location); - } - Deleted: community-x86_64/deep-count-one-filesystem.patch =================================================================== --- community-x86_64/deep-count-one-filesystem.patch 2016-04-09 08:30:00 UTC (rev 169805) +++ community-x86_64/deep-count-one-filesystem.patch 2016-04-09 08:30:09 UTC (rev 169806) @@ -1,120 +0,0 @@ -From fe1f9cd21b521a5f2a89aa6be105fb1af86406b9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <[email protected]> -Date: Sun, 31 Jan 2016 07:56:28 +0100 -Subject: [PATCH] directory: limit deep scount (folder contents and size) to - one filesystem When getting the size of the root directory, nemo was - descending into other filesystems including /proc, causing it to report - nonsensical sizes. Store the fsid of the starting directory, and do not - recurse into other mount points. - -https://bugzilla.gnome.org/show_bug.cgi?id=629394 -https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/585472 - -Based on Nautilus commit: -https://git.gnome.org/browse/nautilus/commit/?id=a645da5f1043c59203fd194fe85b6976d75d2ece - -Original author: Phillip Susi <[email protected]> - -Fixes issue #1050. ---- - libnemo-private/nemo-directory-async.c | 45 ++++++++++++++++++++++++++++++---- - 1 file changed, 40 insertions(+), 5 deletions(-) - -diff --git a/libnemo-private/nemo-directory-async.c b/libnemo-private/nemo-directory-async.c -index 856ab0f..14c7026 100644 ---- a/libnemo-private/nemo-directory-async.c -+++ b/libnemo-private/nemo-directory-async.c -@@ -134,6 +134,7 @@ struct DeepCountState { - GFile *deep_count_location; - GList *deep_count_subdirectories; - GArray *seen_deep_count_inodes; -+ char *fs_id; - }; - - -@@ -2666,6 +2667,7 @@ deep_count_one (DeepCountState *state, - NemoFile *file; - GFile *subdir; - gboolean is_seen_inode; -+ const char *id; - gboolean hidden; - is_seen_inode = seen_inode (state, info); - if (!is_seen_inode) { -@@ -2684,10 +2686,13 @@ deep_count_one (DeepCountState *state, - file->details->deep_directory_count += 1; - } - /* Record the fact that we have to descend into this directory. */ -- -- subdir = g_file_get_child (state->deep_count_location, g_file_info_get_name (info)); -- state->deep_count_subdirectories = g_list_prepend -- (state->deep_count_subdirectories, subdir); -+ id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM); -+ if (g_strcmp0 (id, state->fs_id) == 0) { -+ /* only if it is on the same filesystem */ -+ subdir = g_file_get_child (state->deep_count_location, g_file_info_get_name (info)); -+ state->deep_count_subdirectories = g_list_prepend -+ (state->deep_count_subdirectories, subdir); -+ } - } else { - /* Even non-regular files count as files. */ - if (hidden) { -@@ -2719,6 +2724,7 @@ deep_count_state_free (DeepCountState *state) - } - g_list_free_full (state->deep_count_subdirectories, g_object_unref); - g_array_free (state->seen_deep_count_inodes, TRUE); -+ g_free (state->fs_id); - g_free (state); - } - -@@ -2865,6 +2871,7 @@ deep_count_load (DeepCountState *state, GFile *location) - G_FILE_ATTRIBUTE_STANDARD_SIZE "," - G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "," - G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "," -+ G_FILE_ATTRIBUTE_ID_FILESYSTEM "," - G_FILE_ATTRIBUTE_UNIX_INODE, - G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, /* flags */ - G_PRIORITY_LOW, /* prio */ -@@ -2896,6 +2903,27 @@ deep_count_stop (NemoDirectory *directory) - } - - static void -+deep_count_got_info (GObject *source_object, -+ GAsyncResult *res, -+ gpointer user_data) -+{ -+ GFileInfo *info; -+ const char *id; -+ GFile *file = (GFile *)source_object; -+ DeepCountState *state = (DeepCountState *)user_data; -+ -+ info = g_file_query_info_finish (file, -+ res, -+ NULL); -+ if (info) { -+ id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM); -+ state->fs_id = g_strdup (id); -+ g_object_unref (info); -+ } -+ deep_count_load (state, file); -+} -+ -+static void - deep_count_start (NemoDirectory *directory, - NemoFile *file, - gboolean *doing_io) -@@ -2943,7 +2971,14 @@ deep_count_start (NemoDirectory *directory, - directory->details->deep_count_in_progress = state; - - location = nemo_file_get_location (file); -- deep_count_load (state, location); -+ state->fs_id = NULL; -+ g_file_query_info_async (location, -+ G_FILE_ATTRIBUTE_ID_FILESYSTEM, -+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, -+ G_PRIORITY_DEFAULT, -+ NULL, -+ deep_count_got_info, -+ state); - g_object_unref (location); - } -
