Re: [Tracker] PATCH: Allow specifying user data & cache directory paths in DConf



On 08/08/13 14:42, Jonatan Pålsson wrote:
Hi list,

Hello Jonatan,

I would like to re-locate the user data directory and user cache.
Currently these directories are retrieved using g_get_user_data_dir ()
and g_get_user_cache_dir (), which in turn may be affected by the user
by setting appropriate XDG_* variables. I would however like a more
persistent setting, so I added the user-cache-dir and user-data-dir
keys to the org.freedesktop.Tracker.DB namespace in DConf.

The behavior of the two keys is similar. If the key is set, it takes
precedence over g_get_user_*_dir () and the supplied path is used for
storing the files. If the key is empty (the default setting), the old
behavior is preserved.

Please see the following patch:
https://github.com/Pelagicore/tracker-ivi/commit/213456024d686305d0f6a30b09fa81f04e601fdd

I also have a patch for setting the path to the ontology directory. I
will submit it in a different thread to keep the discussion separate.

Can I ask why do you need this sort of patch?

You can accomplish everything the patch achieves AFAICS by just setting the $XDG_CACHE_HOME, $XDG_CONFIG_HOME and $XDG_DATA_HOME environment variables before running any one of the Tracker binaries. In fact, this is what I do in the script I wrote to have localised Tracker DBs for different datasets.

I would like to avoid adding more config and maintenance burden to specify locations. We already have a lot of that.

Is there some reason the env vars are not enough?

--
Regards,
Martyn

Founder & Director @ Lanedo GmbH.
http://www.linkedin.com/in/martynrussell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]