rpms/gnome-menus/devel gnome-menus-2.11.91-fix-entry-directories.patch, 1.1, 1.2 gnome-menus.spec, 1.16, 1.17
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Aug 18 12:53:21 UTC 2005
Author: markmc
Update of /cvs/dist/rpms/gnome-menus/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv6300
Modified Files:
gnome-menus-2.11.91-fix-entry-directories.patch
gnome-menus.spec
Log Message:
* Thu Aug 18 2005 Mark McLoughlin <markmc at redhat.com> 2.11.91-3
- Fix infinite loop in patch for gnome #313624
gnome-menus-2.11.91-fix-entry-directories.patch:
ChangeLog | 64 +++++++++++++
libmenu/entry-directories.c | 212 ++++++++++++++++++++------------------------
2 files changed, 165 insertions(+), 111 deletions(-)
Index: gnome-menus-2.11.91-fix-entry-directories.patch
===================================================================
RCS file: /cvs/dist/rpms/gnome-menus/devel/gnome-menus-2.11.91-fix-entry-directories.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnome-menus-2.11.91-fix-entry-directories.patch 18 Aug 2005 08:20:09 -0000 1.1
+++ gnome-menus-2.11.91-fix-entry-directories.patch 18 Aug 2005 12:53:18 -0000 1.2
@@ -1,72 +1,5 @@
---- gnome-menus-2.11.91/ChangeLog.fix-entry-directories 2005-08-09 08:28:27.000000000 -0400
-+++ gnome-menus-2.11.91/ChangeLog 2005-08-18 04:17:11.000000000 -0400
-@@ -0,0 +1,64 @@
-+2005-08-18 Mark McLoughlin <mark at skynet.ie>
-+
-+ Fixes "duplicate entry" issue in bug #313624
-+
-+ * libmenu/entry-directories.c:
-+ (handle_cached_dir_changed): Look up the CachedDir
-+ for the parent of whatever path we're being notified
-+ about - we could be getting notified about ourself
-+ being created/deleted.
-+
-+2005-08-18 Mark McLoughlin <mark at skynet.ie>
-+
-+ Obfuscate this code some more. Basic issue is that if an
-+ EntryDirectory has a subdir which is also an EntryDirectory
-+ and the subdir gets deleted, then the CachedDir for the subdir
-+ gets freed leaving us with a dangling reference in the
-+ EntryDirectory.
-+
-+ * libmenu/entry-directories.c:
-+ (cached_dir_find_relative_path),
-+ (cached_dir_lookup): remove infinite loop code path.
-+ (cached_dir_add_subdir): if the subdir already exists
-+ but is deleted, just undelete it.
-+ (cached_dir_remove_subdir): if the subdir is referenced
-+ by an EntryDirectory, just mark it as deleted and don't
-+ free it.
-+ (cached_dir_add_reference),
-+ (cached_dir_remove_reference): keep track of how many
-+ EntryDirectories reference a CachedDir. If the count
-+ falls to zero and the CachedDir is marked as deleted,
-+ free it.
-+ (entry_directory_new_full): add a reference here.
-+ (entry_directory_unref): remove it here.
-+ (entry_directory_foreach_recursive),
-+ (entry_directory_get_flat_contents): don't list the
-+ contents of a dir if its marked as deleted.
-+
-+2005-08-17 Mark McLoughlin <mark at skynet.ie>
-+
-+ * libmenu/entry-directories.c:
-+ (cached_dir_clear_entries),
-+ (cached_dir_clear_subdirs): remove
-+ (cached_dir_free): free the subdirs and entries
-+ directly here.
-+ (cached_dir_load_entries_recursive): no need to
-+ free the entries here - there shouldn't be any at this
-+ point.
-+ (cached_dir_load): remove.
-+ (entry_directory_new_full): lookup and load the
-+ CachedDir directly here.
-+
-+2005-08-17 Mark McLoughlin <mark at skynet.ie>
-+
-+ * libmenu/entry-directories.c:
-+ (cached_dir_get_full_path),
-+ (cached_dir_ensure_loaded),
-+ (cached_dir_get_subdirs),
-+ (cached_dir_get_entries): remove all this code.
-+ (entry_directory_foreach_recursive),
-+ (entry_directory_get_flat_contents): directly reference
-+ a CachedDir's subdirs and entries lists since we can
-+ be sure they're always already loaded - they get loaded
-+ in entry_directory_new_full()
-+
--- gnome-menus-2.11.91/libmenu/entry-directories.c.fix-entry-directories 2005-07-25 06:32:51.000000000 -0400
-+++ gnome-menus-2.11.91/libmenu/entry-directories.c 2005-08-18 04:17:11.000000000 -0400
++++ gnome-menus-2.11.91/libmenu/entry-directories.c 2005-08-18 08:52:29.000000000 -0400
@@ -62,7 +62,9 @@
GSList *monitors;
@@ -287,7 +220,7 @@
static void
cached_dir_add_monitor (CachedDir *dir,
EntryDirectory *ed,
-@@ -645,32 +607,49 @@
+@@ -645,32 +607,51 @@
}
static void
@@ -295,11 +228,11 @@
+cached_dir_add_reference (CachedDir *dir)
{
- char *path;
-+ dir->references++;
-
+-
- if (dir->have_read_entries)
- return;
--
++ dir->references++;
+
- path = cached_dir_get_full_path (dir);
- cached_dir_load_entries_recursive (dir, path);
- g_free (path);
@@ -330,18 +263,20 @@
+ if (dir->parent != NULL)
+ {
+ GSList *tmp;
-
-- return dir->entries;
++
+ tmp = parent->subdirs;
+ while (tmp != NULL)
+ {
+ CachedDir *subdir = tmp->data;
-+
+
+- return dir->entries;
+ if (!strcmp (subdir->name, dir->name))
+ {
+ parent->subdirs = g_slist_delete_link (parent->subdirs, tmp);
+ break;
+ }
++
++ tmp = tmp->next;
+ }
+ }
+
@@ -355,7 +290,7 @@
}
/*
-@@ -684,7 +663,6 @@
+@@ -684,7 +665,6 @@
const char *legacy_prefix)
{
EntryDirectory *ed;
@@ -363,7 +298,7 @@
char *canonical;
menu_verbose ("Loading entry directory \"%s\" (legacy %s)\n",
-@@ -699,12 +677,14 @@
+@@ -699,12 +679,14 @@
return NULL;
}
@@ -382,7 +317,7 @@
ed->legacy_prefix = g_strdup (legacy_prefix);
ed->entry_type = entry_type;
ed->is_legacy = is_legacy != FALSE;
-@@ -749,6 +729,8 @@
+@@ -749,6 +731,8 @@
if (--ed->refcount == 0)
{
@@ -391,7 +326,7 @@
ed->dir = NULL;
ed->entry_type = DESKTOP_ENTRY_INVALID;
ed->is_legacy = FALSE;
-@@ -848,9 +830,12 @@
+@@ -848,9 +832,12 @@
GSList *tmp;
int relative_path_len;
@@ -405,7 +340,7 @@
while (tmp != NULL)
{
DesktopEntry *entry = tmp->data;
-@@ -878,7 +863,7 @@
+@@ -878,7 +865,7 @@
tmp = tmp->next;
}
@@ -414,7 +349,7 @@
while (tmp != NULL)
{
CachedDir *subdir = tmp->data;
-@@ -933,7 +918,7 @@
+@@ -933,7 +920,7 @@
if (subdirs)
*subdirs = NULL;
@@ -423,7 +358,7 @@
while (tmp != NULL)
{
DesktopEntry *entry = tmp->data;
-@@ -968,12 +953,15 @@
+@@ -968,12 +955,15 @@
if (subdirs)
{
@@ -441,3 +376,70 @@
tmp = tmp->next;
}
+--- gnome-menus-2.11.91/ChangeLog.fix-entry-directories 2005-08-09 08:28:27.000000000 -0400
++++ gnome-menus-2.11.91/ChangeLog 2005-08-18 08:52:14.000000000 -0400
+@@ -0,0 +1,64 @@
++2005-08-18 Mark McLoughlin <mark at skynet.ie>
++
++ Fixes "duplicate entry" issue in bug #313624
++
++ * libmenu/entry-directories.c:
++ (handle_cached_dir_changed): Look up the CachedDir
++ for the parent of whatever path we're being notified
++ about - we could be getting notified about ourself
++ being created/deleted.
++
++2005-08-18 Mark McLoughlin <mark at skynet.ie>
++
++ Obfuscate this code some more. Basic issue is that if an
++ EntryDirectory has a subdir which is also an EntryDirectory
++ and the subdir gets deleted, then the CachedDir for the subdir
++ gets freed leaving us with a dangling reference in the
++ EntryDirectory.
++
++ * libmenu/entry-directories.c:
++ (cached_dir_find_relative_path),
++ (cached_dir_lookup): remove infinite loop code path.
++ (cached_dir_add_subdir): if the subdir already exists
++ but is deleted, just undelete it.
++ (cached_dir_remove_subdir): if the subdir is referenced
++ by an EntryDirectory, just mark it as deleted and don't
++ free it.
++ (cached_dir_add_reference),
++ (cached_dir_remove_reference): keep track of how many
++ EntryDirectories reference a CachedDir. If the count
++ falls to zero and the CachedDir is marked as deleted,
++ free it.
++ (entry_directory_new_full): add a reference here.
++ (entry_directory_unref): remove it here.
++ (entry_directory_foreach_recursive),
++ (entry_directory_get_flat_contents): don't list the
++ contents of a dir if its marked as deleted.
++
++2005-08-17 Mark McLoughlin <mark at skynet.ie>
++
++ * libmenu/entry-directories.c:
++ (cached_dir_clear_entries),
++ (cached_dir_clear_subdirs): remove
++ (cached_dir_free): free the subdirs and entries
++ directly here.
++ (cached_dir_load_entries_recursive): no need to
++ free the entries here - there shouldn't be any at this
++ point.
++ (cached_dir_load): remove.
++ (entry_directory_new_full): lookup and load the
++ CachedDir directly here.
++
++2005-08-17 Mark McLoughlin <mark at skynet.ie>
++
++ * libmenu/entry-directories.c:
++ (cached_dir_get_full_path),
++ (cached_dir_ensure_loaded),
++ (cached_dir_get_subdirs),
++ (cached_dir_get_entries): remove all this code.
++ (entry_directory_foreach_recursive),
++ (entry_directory_get_flat_contents): directly reference
++ a CachedDir's subdirs and entries lists since we can
++ be sure they're always already loaded - they get loaded
++ in entry_directory_new_full()
++
Index: gnome-menus.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-menus/devel/gnome-menus.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- gnome-menus.spec 18 Aug 2005 08:20:09 -0000 1.16
+++ gnome-menus.spec 18 Aug 2005 12:53:18 -0000 1.17
@@ -7,7 +7,7 @@
Summary: A menu system for the GNOME project
Name: gnome-menus
Version: 2.11.91
-Release: 2
+Release: 3
License: LGPL
Group: System Environment/Libraries
URL: http://www.gnome.org/
@@ -93,6 +93,9 @@
%{_bindir}/gnome-menu-spec-test
%changelog
+* Thu Aug 18 2005 Mark McLoughlin <markmc at redhat.com> 2.11.91-3
+- Fix infinite loop in patch for gnome #313624
+
* Thu Aug 18 2005 Mark McLoughlin <markmc at redhat.com> 2.11.91-2
- Add patch to fix "duplicate entries after upgrade" issue (gnome #313624)
More information about the fedora-cvs-commits
mailing list