From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C44AC138A1F for ; Wed, 29 Jan 2014 16:46:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19010E0B4B; Wed, 29 Jan 2014 16:46:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 35BE1E098A for ; Wed, 29 Jan 2014 16:46:32 +0000 (UTC) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 265A333F6F4 for ; Wed, 29 Jan 2014 16:46:31 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id a1so3985890wgh.4 for ; Wed, 29 Jan 2014 08:46:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=yEEdy/oldl5taUMAlceOI8blOT61dl48CiC6cV8TC2s=; b=h2FNNgbbfFX/zxsBIGLHQ1QURPVmQpTk0sLEGwqiTcdPGoWDDZ0+EM05wRQO8k55Ty phOP/bpj2qXAtDpWG8Gd6m4qOoW+QvZn5wXYfjQD3rPHII4SzQFKqRUyuHl+xk/LJqv8 NBTxBmeyGRMrD+0zn7P059UlYG+clUHncvvPvfr9bmqfb8PERGBUO3idyypPBre12tHF HbTpfj0YMIWM8jxeY920TGMJwOpfvu4VQVE2unY8cEdsU6snfw0I9uKav+zTBQt+h/tO x4z0qQT3lLt2fj6dWnu90we5UzjE/Qv7+vis8fbt8G7wwChih5oUL9R7xO1owG6KvOjd gx9g== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.194.87.5 with SMTP id t5mr878178wjz.68.1391013988631; Wed, 29 Jan 2014 08:46:28 -0800 (PST) Received: by 10.194.162.229 with HTTP; Wed, 29 Jan 2014 08:46:28 -0800 (PST) In-Reply-To: <1390977437.7120.2.camel@lightboat.home> References: <20140125221628.26f3aa96@pomiot.lan> <20140126204926.33f2baef@googlemail.com> <20140126213527.1f5f6192@googlemail.com> <20140126225959.6f17bf8a@pomiot.lan> <20140126220347.720b12ed@googlemail.com> <20140127011054.2038.qmail@stuge.se> <1390863743.4662.7.camel@kanae> <1390977437.7120.2.camel@lightboat.home> Date: Wed, 29 Jan 2014 11:46:28 -0500 Message-ID: Subject: Re: [gentoo-dev] Dealing with XDG directories in ebuild environment From: Mike Gilbert To: Gentoo Dev Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: f976161b-e9c0-48aa-b90c-6a0267447bb5 X-Archives-Hash: 439ab94d6f0e55685c47b52a9f7900da On Wed, Jan 29, 2014 at 1:37 AM, Alexandre Rostovtsev wrote: > [Replying again since my mailer messed up my original message.] > > On Tue, 2014-01-28 at 12:03 -0500, Mike Gilbert wrote: >> Option 3: Unset the variables >> >> This should cause applications to default to locations under ${HOME}. >> This could be done in global scope (unless I am overlooking something >> in PMS), and so it would not require consumers to invoke anything >> explicitly. > > Only those applications that properly comply with standards :) > > For instance, glib did not start respecting ${HOME} until version 2.36 > if I remember right; before that, unset XDG_* variables would cause > g_get_user_cache_dir() etc. to fall back to something under /root/ no > matter where ${HOME} pointed. Which is the main reason why > gnome2_environment_reset() was created. > > Ah, thank you for that insight. Ok, so I'm thinking maybe it would be best to combine option 1 and option 3. We would unset the variables in global scope, and then have a function that ebuilds or other eclasses could call to basically do exactly what gnome2_reset_environment does and reset them to some path under $T. I'll work on a prototype for that.