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 583234 - [PATCH] support for path elements defined in environment
[PATCH] support for path elements defined in environment
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-19 18:09 UTC by Stanislav Brabec
Modified: 2009-07-13 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GConf-2.26.0-envinclude.patch (2.10 KB, patch)
2009-05-19 18:10 UTC, Stanislav Brabec
none Details | Review

Description Stanislav Brabec 2009-05-19 18:09:47 UTC
Description:

Sometimes it is useful to start session with a gconf path different than the default.

In the current implementation there is only way to do it - include "$(HOME)/.gconf.path". It is a bit fragile - one must delete it after the session, otherwise next session will be corrupted by unwanted contents.

Attached patch introduces a new path file keyword: envinclude, which cannot have this side effect.

envinclude first evaluates its argument as an environment variable. If it is not empty, it is used as "include" argument. If it is empty, it is silently skipped.

Example:
echo 'xml:readwrite:$(HOME)/mygconf' >~/.mygconf.path ; ( export GCONF_PATH_PREFERRED_DEFAULTS="${HOME}/.mygconf.path" ; gconftool-2 --type=string --set /testkey "TEST" ; gconftool-2 --get /testkey ) ; gconftool-2 --get /testkey
TEST
No value set for `/testkey'
(Test works only if you are not loged in.)
Comment 1 Stanislav Brabec 2009-05-19 18:10:30 UTC
Created attachment 134963 [details] [review]
GConf-2.26.0-envinclude.patch
Comment 2 Stanislav Brabec 2009-05-20 13:05:02 UTC
Note: The windows code is a copy/paste from "include" processing. It was not tested.
Comment 3 Dan Winship 2009-06-18 00:40:18 UTC
See also bug 586183, which allows overriding the entire source list.
Comment 4 Stanislav Brabec 2009-07-07 09:37:37 UTC
As bug 586183 patch targeting a very similar use case was already committed, please decide about this patch:

+ This patch is a bit easier to use in a specific use cases (keep original path but dynamically add few path elements).

- It is less flexible in other use cases than patch in bug 586183.

- Having two features providing nearly the same function may be an overkill.


Declining this patch is not a big problem for me.
Comment 5 Ray Strode [halfline] 2009-07-13 15:20:37 UTC
Hi,

I tend to agree having two ways to do this may be overkill.

Given you don't mind, let's just close this bug out.