After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 157877 - update-desktop-database doesn't handle duplicate entries
update-desktop-database doesn't handle duplicate entries
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2004-11-10 18:46 UTC by Sebastien Bacher
Modified: 2006-04-19 02:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2004-11-10 18:46:12 UTC
# cat /usr/share/applications/test.desktop
[Desktop Entry]
[Desktop Entry]

# ./desktop-file-validate /usr/share/applications/test.desktop
/usr/share/applications/test.desktop: parse error: Two [Desktop Entry] or [KDE
Desktop Entry] sections seen

# ./update-desktop-database

** (process:26327): CRITICAL **: egg_desktop_entries_add_group: assertion
`egg_desktop_entries_lookup_group (entries, group_name) == NULL' failed


desktop-file-validate detects the problem but update-desktop-database only
displays this  ...
Comment 1 Loïc Minier 2005-03-12 18:49:41 UTC
This is Debian bug <http://bugs.debian.org/298668>.
Comment 2 Ray Strode [halfline] 2006-04-18 21:59:25 UTC
Bug 319987 has a patch to move update-desktop-database to GKeyFile, and we should definitely go that route.

Unfortunately, GKeyFile has the same bug. 

Reassigning to glib.
Comment 3 Matthias Clasen 2006-04-19 02:40:51 UTC
2006-04-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_add_group): Accept duplicate
	groups.  (#157877, Sebastien Bacher)

	* tests/keyfile-test.c: Add tests for duplicate key and
	duplicate group handling.