GNOME Bugzilla – Bug 576079
Alacarte should avoid retaining unneeded files in ~/.local/share/applications
Last modified: 2021-05-25 17:45:08 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"
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.