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 325585 - Can't delete configs if config added with gconftool-2
Can't delete configs if config added with gconftool-2
Status: RESOLVED FIXED
Product: filemanager-actions
Classification: Other
Component: general
0.99
Other All
: Normal normal
: ---
Assigned To: Nautilus-actions Maintainer(s)
Nautilus-actions Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-01-03 08:45 UTC by Frederic Ruaudel
Modified: 2009-07-26 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Frederic Ruaudel 2006-01-03 08:45:47 UTC
Please describe the problem:
When you install a config from a GConf schema description file with the command :

/usr/bin/gconftool-2 --install-schema-file=test.schemas

Then it is no more possible to delete them with Nact. Each time you restart
Nact, the configs show up again.


Steps to reproduce:
1. Create a config with nact
2. Export it into a GConf schema description file
3. Remove the config from Nact
4. Install the schema desc file with the command above
5. Remove it using Nact again
6. Restart Nact

Actual results:
The config is still there

Expected results:
The config must be removed

Does this happen every time?
yes

Other information:
It seems that it can only be removed with 

/usr/bin/gconftool-2 --recursive-unset
/schemas/apps/nautilus-actions/configurations/XXXX-XXXX-XXXX-XXXXXXXXX

by the user who installed it.
Comment 1 Frederic Ruaudel 2006-01-03 08:48:08 UTC
Note: This report has been initially submitted on the old nautilus-actions bug
tracker : 

http://www.grumz.net/node/138
Comment 2 Renato 2006-08-23 13:55:21 UTC
I'd like to second this bug: it bit me too, recently.

Had to remove the gconf keys manually.
Comment 3 Frederic Ruaudel 2006-08-23 14:38:51 UTC
I think maybe it could be fixed by the Bug #325519 which will add the possibility to disable a config without deleting it. Because the installation of a config with gconftool can be useful for program that wants to install a config system wide. But if the user can delete it, he has no mean to retrieve it after that, but should be able to disable it anyway.
Comment 4 Renato 2006-08-23 15:35:34 UTC
Oh, now I think I get it: if it is added with gconftool, then it is system wide, and has to be removed with gconftool too.

Not unreasonable: a properly packaged application (say, in a .deb or .rpm) will install the .schema in the postinstall section of the package. And remove it when the rpm/deb is removed. You cannot install rpms in userspace, only systemwide, so this makes sense.

A user that does not want to see a particular Action will simply hide it.

Clever! :)
Comment 5 Pierre Wieser 2009-07-16 09:10:25 UTC
Well, the keyword here is 'schema'.

Up to 1.10.x serie, NACT exports actions as schema files.

When reimported via NACT, the program only takes care of 'applyto' nodes, and so only creates new entries under /apps key of GConf.  So NACT can really delete them.

When reimported via gconftool-2 --install-schema-file, GConf actually installs the exported schema. But (apparently) GConf refuses to delete a key to which an existing schema applies to. And NACT doesn't catch the delete error (if any, have not checked this myself), but just updates its internal list of actions. Which explains why the action seems to have been deleted in the UI.

The problem has so nothing to do with system-wide or not : keys and schema are installed under ~/.gconf.

What to do now ?

A lot of actions have been exported, and are available, as GConf schemas. Obviously, one cannot prevent any user/packager to use the gconftool-2 --install-schema-file command to install these actions.

So we have to deal with them.

As a first step, we should delete both key and corresponding schema when deleting an action from NACT. This should do the trick.

As a second step, I'd suggest to export actions as simple entries (see gconftool-2 --dump) rather than as schemas. More, I don't see any reason why to export a schema ?

I propose to implement these two steps in upcoming 1.12.

Regards
Pierre

Comment 6 Pierre Wieser 2009-07-26 12:49:57 UTC
I confirm :

- deleting an entry which has been created as an 'applyto' key by gconftool-2 install-schema-file silently does nothing (no error is triggered)

- deleting the schema keys which may be directly attached to the key fixes the problem

At least this problem fix will be part of upcoming 1.12

Regards
Pierre