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 608421 - glib desktop-app-info.c test removes gedit.desktop in real filesystem
glib desktop-app-info.c test removes gedit.desktop in real filesystem
Product: glib
Classification: Platform
Component: gio
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
Depends on:
Reported: 2010-01-29 09:33 UTC by Pacho Ramos
Modified: 2018-05-24 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---

Don't access system-wide gedit.desktop (3.27 KB, patch)
2013-10-12 14:43 UTC, Ihar Hrachyshka
none Details | Review
Make can_delete/delete consistent (2.01 KB, patch)
2013-10-12 14:44 UTC, Ihar Hrachyshka
none Details | Review

Description Pacho Ramos 2010-01-29 09:33:27 UTC
This was originally reported downstream to

The problem is that, when building glib with tests enabled, I got my /usr/share/applications/gedit.desktop removed. 

Due some investigation in downstream bug, seems that this is done by desktop-app-info test, since gedit.desktop removal is now workarounded downstream (but, of course, test is now failing).

Maybe an idea would be to provide with glib sources a .desktop file used for test with it, without touching real system 

Thanks a lot
Comment 1 Ihar Hrachyshka 2013-10-12 14:43:29 UTC
Created attachment 257102 [details] [review]
Don't access system-wide gedit.desktop

Attached test that removes dependency from system-wide gedit.desktop.
Comment 2 Ihar Hrachyshka 2013-10-12 14:44:38 UTC
Created attachment 257103 [details] [review]
Make can_delete/delete consistent

This patch depends on the first one and should be applied with it. This fixes inconsistency when g_desktop_info_can_delete() returns FALSE while g_desktop_info_delete() succeeds.
Comment 3 Allison Karlitskaya (desrt) 2013-10-15 14:41:31 UTC
This feels a bit too much like "fixing" a testcase when it has actually demonstrated a real problem that we should fix.

I guess the real solution here is to only attempt deletes from XDG_DATA_HOME, and not from the system xdg directories.
Comment 4 Ihar Hrachyshka 2013-10-16 16:09:13 UTC
Yes, that's probably another, better solution.

Though the test should probably be rewritten anyway (see the first patch), so that it does not assume/access system wide gedit.desktop as it just may not be present on the system (in which case we effectively disable this part of the test). The solution with temporary directory [created outside XDG_DATA_HOME] should be applicable.
Comment 5 GNOME Infrastructure Team 2018-05-24 12:06:21 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: