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 328623 - GConf using merged trees does not clean up schemas on uninstall
GConf using merged trees does not clean up schemas on uninstall
Status: RESOLVED WONTFIX
Product: GConf
Classification: Deprecated
Component: gconf
2.16.x
Other All
: Normal critical
: ---
Assigned To: GConf Maintainers
GConf Maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2006-01-25 17:54 UTC by Joe Marcus Clarke
Modified: 2018-08-17 13:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Joe Marcus Clarke 2006-01-25 17:54:59 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.
Comment 1 Mark McLoughlin 2006-01-26 07:40:00 UTC
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.
Comment 2 Joe Marcus Clarke 2006-03-06 21:26:26 UTC
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.
Comment 3 Kjartan Maraas 2006-08-10 14:07:04 UTC
is this still a blocker for 2.16?
Comment 4 Joe Marcus Clarke 2006-08-10 14:10:42 UTC
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.
Comment 5 André Klapper 2006-09-12 13:28:43 UTC
mark, gconf-maintainers: *ping* - any progress here?
Comment 6 namritaagarwal 2007-02-21 12:12:31 UTC
(In reply to comment #5)
> mark, gconf-maintainers: *ping* - any progress here?
> 

I found this bug fixed in Head code.
Comment 7 André Klapper 2007-02-21 16:28:03 UTC
namritaagarwal: does this mean that you cannot reproduce this, or did you really take a look at the code?
Comment 8 namritaagarwal 2007-02-23 11:03:45 UTC
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.

Comment 9 Joe Marcus Clarke 2007-02-28 21:19:09 UTC
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.
Comment 10 André Klapper 2018-08-17 13:54:21 UTC
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!