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 576079 - Alacarte should avoid retaining unneeded files in ~/.local/share/applications
Alacarte should avoid retaining unneeded files in ~/.local/share/applications
Status: RESOLVED OBSOLETE
Product: alacarte
Classification: Applications
Component: general
0.11.x
Other Linux
: Normal enhancement
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-03-20 13:26 UTC by Pedro Villavicencio
Modified: 2021-05-25 17:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30



Description Pedro Villavicencio 2009-03-20 13:26:34 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/alacarte/+bug/340285

"I ran into some unexpected behaviour when uninstalling a package, reported as a bug here:
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/340162

The extra .desktop file created by Alacarte was left behind in ~/.local/share/applications. I realize that Alacarte cannot know when the package is removed that that file should be deleted.
https://bugs.launchpad.net/ubuntu/+source/alacarte/+bug/55853

However, Alacarte /can/ somtimes realize when the ~/.local copy is no longer needed. For me a common action is checking/unchecking items to show/hide them in the menus. When unchecked, alacarte creates the local copy to override the system one and hide the application. This can lead to the unexpected behaviour that #33853 mentioned, but it should be the package manager's job to get rid of the old file. When the item is rechecked, however, the local copy is no longer needed. If alacarte were smart about this, it would realize that the local copy is now identical to the system one, and delete the local copy. (This could happen with other modifications, too, but seems less likely).

I've never written a patch before, and only know just enough Python to be dangerous, but I'm going to take a look at the source."

patch:

http://launchpadlibrarian.net/23740418/patch-MenuEditor

"I've tried to attach a patch that applies to MenuEditor.py. I started from alacarte-0.11.9 obtained from apt-get source alacarte.

The patch contains a function checkDuplicate(item) that checks whether the current item already exists system-wide. I imagined it being called when a .desktop file in ~/.local was going to be edited. If the local file to be written was the same as the system version, the local version should be deleted"
Comment 1 André Klapper 2021-05-25 17:45:08 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/alacarte/-/issues/

Thank you for your understanding and your help.