Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Dealing with XDG directories in ebuild environment
Date: Wed, 29 Jan 2014 16:46:41
Message-Id: CAJ0EP40G-k86oJRLW5BFYizoJqOnS8ZfjFKzErcWaiE1NkwMGg@mail.gmail.com
In Reply to: Re: [gentoo-dev] Dealing with XDG directories in ebuild environment by Alexandre Rostovtsev
1 On Wed, Jan 29, 2014 at 1:37 AM, Alexandre Rostovtsev
2 <tetromino@g.o> wrote:
3 > [Replying again since my mailer messed up my original message.]
4 >
5 > On Tue, 2014-01-28 at 12:03 -0500, Mike Gilbert wrote:
6 >> Option 3: Unset the variables
7 >>
8 >> This should cause applications to default to locations under ${HOME}.
9 >> This could be done in global scope (unless I am overlooking something
10 >> in PMS), and so it would not require consumers to invoke anything
11 >> explicitly.
12 >
13 > Only those applications that properly comply with standards :)
14 >
15 > For instance, glib did not start respecting ${HOME} until version 2.36
16 > if I remember right; before that, unset XDG_* variables would cause
17 > g_get_user_cache_dir() etc. to fall back to something under /root/ no
18 > matter where ${HOME} pointed. Which is the main reason why
19 > gnome2_environment_reset() was created.
20 >
21 >
22
23 Ah, thank you for that insight.
24
25 Ok, so I'm thinking maybe it would be best to combine option 1 and
26 option 3. We would unset the variables in global scope, and then have
27 a function that ebuilds or other eclasses could call to basically do
28 exactly what gnome2_reset_environment does and reset them to some path
29 under $T.
30
31 I'll work on a prototype for that.