Bug 48114 (suse33114)

Summary: orphan gconf2 files after uninstallation/update
Product: [openSUSE] openSUSE 10.3 Reporter: Stanislav Brabec <sbrabec>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: gnome-bugs, mls, sbrabec
Version: Alpha 1   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stanislav Brabec 2003-11-13 21:35:58 UTC
Our SuSEconfig.gconf2 implements only --makefile-install-rule, but not
--makefile-uninstall-rule. It causes orphan/outdated gconf2 items in installed
database after package update or remove.

Fix will require %preun for all packages complementary to %post and implementing
run-gconf2-schema-uninstallation.
Comment 1 Stanislav Brabec 2003-11-13 21:45:41 UTC
This bug also affects package galeon, bug Bugzilla rejects to accept this
package name.
Comment 2 Stanislav Brabec 2003-11-19 18:55:48 UTC
We have a temporary solution in PLUS, STABLE and 9.0 (not YOU) as side of bug
48078 fix (clean-up is done during gconf2 update).

Clean fix is still needed.
Comment 3 Stanislav Brabec 2004-03-09 22:57:42 UTC
It seems that it is not possible to solve it correctly using current version of
gconftool and RPM.

Proposed solution:

Install schemas in %post. Don't deinstall it at all (all possible ways inside
RPM are dangerous and can fail in particular cases). Add script for gconf
database rebuild from scratch. Add one time script to run this rebuild after
product upgrade.
Comment 4 Stanislav Brabec 2004-03-19 01:20:19 UTC
For system update it's already solved (bug 51196). For package uninstallation,
there is gconftool-rebuild. There is a chance to collect key lists and purge via
script, which can be implemented in future, if gconf itself will not solve it.

Decreasing to minor.
Comment 5 Rodrigo Moya 2005-05-30 15:29:18 UTC
Packaging problem then
Comment 6 Stanislav Brabec 2005-05-30 16:31:32 UTC
No, it's a problem of incompatible design of RPM and GConf. GConf expects
"remove old, then install new", RPM does "install new, then remove residues of old".

Adding RPM expert to Cc:.

Please re-assign bug to somebody who can discuss this and implement it.


There are two possible solutions - adopt RPM to be able to do it (it means
implementing of %preuntrans scriptlet) or adopt GConf to be able to use current
scriptlets %post and %preun.

Third solution is creating alternative key database, which is independent on RPM
and GConf and updated keys properly.

Fourth solution is rebuilding GConf database from scratch after each update (I
wrote a script gconftool-rebuild to do it).

I spent a lot of time trying to fix. But it's seems to be impossible without
maintaining outdated keylists forever.


The problem is, that packaging systems first installs new files, then removes
old ones. It means, that --makefile-uninstall-rule in %preun is called after old
files are overwritten, but it is designed to be called before overwritting of
old files. But RPM does not have such feature.

I guess it's not yet reported upstream.


What needs to be changed in RPM to be compatible with current GConf:

- Update to latest RPM, which implements %posttrans

- Implement %preuntrans scriptlet as a counterpart of %posttrans

Note that this solution will have principial problem with service outage during
update.


What needs to be changed in GConf to be compatible with current RPM:

- Add serial to schemas file name. The serial has to be changed whenever key
list in schemas file changes.

- Add serial attribute to schemas file (or add serial to owner attribute).

- Improve --makefile-uninstall-rule to uninstall only keys owned by proper owner
(or add --makefile-uninstall-unowned-rule).

- Optionally add ownership check to --makefile-install-rule - it should issue
warning, when overwriting key with different owner. It can be OK if package is
renamed, splitted, but generally it can mean problems.
Comment 7 Stanislav Brabec 2005-06-08 17:06:10 UTC
Reported upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=306924
Comment 8 Michael Gross 2005-10-04 11:13:18 UTC
Due to the proposal from Andreas Jaeger, open bugs for the versions 8.2 and 9.0
will be closed as the probability that these bugs are already fixed in the
current realease is very high.

If, however, one of these problems are still residing in the current release
(10.0 RC4 or greater), the component should be changed accordingly and the bug
should be reopened with a useful comment and/or information helping to actually
solve the problem. In the same step, these reopened bugs should be assigned.

With kindly regards,
the BNC-Screening-Team
Comment 9 Stanislav Brabec 2005-10-04 11:41:47 UTC
Still not properly fixed, only worked around in distribution upgrade.

In one particular situation, this work-around causes real problems - if package
providing a thumbnailer is removed, there is no way to remove associated GConf keys.
Comment 10 Bodo Bauer 2006-04-27 11:41:27 UTC
There has been no activity for more than 3 month. I'm closing this bug as 
WONTFIX. If you feel this is inappropriate and the bug should remain open, 
or you have new information which may lead to an actual resolution, please 
reopen the bug and add the new status.
Comment 11 JP Rosevear 2006-04-27 12:17:09 UTC
Re-opening.  This needs fixing at some point.
Comment 12 JP Rosevear 2006-04-27 12:34:27 UTC
Resolving later.
Comment 13 Stanislav Brabec 2006-12-11 17:47:54 UTC
Reopening. It seems, that using combination of %pre, %preun and %posttrans can do the stuff cleanly.
Comment 14 Stanislav Brabec 2007-01-16 13:36:31 UTC
I believe that the problem is just now fixed correctly by gconf2 /etc/rpm/macros.gconf2.