GNOME Bugzilla – Bug 328623
GConf using merged trees does not clean up schemas on uninstall
Last modified: 2018-08-17 13:54:21 UTC
Please describe the problem: The new merged tree scheme in GConf is causing some packaging problems. When we run --makefile-uninstall-rule, the leaves get removed, but the directories are retained. This means that the %gconf-tree*.xml files are left on the file system after the last GConf consumer has been uninstalled. Can --makefile-uninstall-rule be adapted to remove these <dir> entries as well (and the %gconf-tree*.xml files if they are empty)? The only other solution I see is to have GConf itself delete the files when it is uninstalled, then run gconftool-2 --makefile-install-rule for each schema up re-installation. This seems inefficient, though. Steps to reproduce: 1. Install an application that instals GConf schemas 2. Run gconftool-2 --makefile-uninstall-rule /path/to/app.schema 3. Note that the %gconf-tree*.xml files are not deleted even though all schema leaves have been removed Actual results: The GConf schmea leaves are deleted, but once all of the leaves are removed, the %gconf-tree*.xml files are retained as they contain all of the <dir> tags. Expected results: I would expect the %gconf-tree*.xml files to be deleted once all the consumers have been uninstalled. Does this happen every time? Yes. Other information: This is a major problem for packaging as GConf-based apps are now leaving leftover files upon uninstallation.
First look at the code suggested that delete_useless_subdirs() should be called before save_tree() rather than after it ... but it needs some detailed thought.
This bug really needs a fix for 2.14 release time. It will keep FreeBSD from packaging GNOME since we must make sure our packages do not leave any leftover files. I'm sure other packagers face the same challenge.
is this still a blocker for 2.16?
It's still a problem, and it's still causing our package building grief, but we have worked around it with the assumption that our kluge will only be temporary.
mark, gconf-maintainers: *ping* - any progress here?
(In reply to comment #5) > mark, gconf-maintainers: *ping* - any progress here? > I found this bug fixed in Head code.
namritaagarwal: does this mean that you cannot reproduce this, or did you really take a look at the code?
Yes i could not reproduce this issue using CVS HEAD gconf sources. Tried the below steps: Executed, gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/desktop_gnome_url_handlers.schemas Observation: On doing this, all the %gconf.xml files under /etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/url_handlers and /etc/gconf/gconf.xml.defaults/desktop/gnome/url_handlers were deleted. Also 'url_handlers' directory was deleted.
There was never a problem when using the old non-merged GConf format. The problem only occurs in the merged tree format. In that case, the %gconf-tree files are not removed when all of the branches are removed. And I can still reproduce the behavior in 2.16.1.
GConf has been deprecated since 2011. GConf is not under active development anymore. Its codebase has been archived: https://gitlab.gnome.org/Archive/gconf/commits/master dconf and gsettings are its successors. See https://developer.gnome.org/gio/stable/ch34.html and https://developer.gnome.org/GSettings/ for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of dconf/gsettings. Thanks!