Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Cc: gnome@g.o, freedesktop-bugs@g.o, Sam James <sam@g.o>
Subject: [gentoo-dev] [PATCH v2 1/2] xdg-utils.eclass: reset XDG_STATE_HOME
Date: Sat, 01 Oct 2022 07:15:19
Message-Id: 20221001071505.789405-1-sam@gentoo.org
1 XDG_STATE_HOME is defined in the basedir spec just like XDG_DATA_HOME and
2 XDG_CONFIG_HOME, so we should cover it.
3
4 We have to set in eclass because we still have < EAPI 7 ebuilds in tree
5 (no ENV_UNSET).
6
7 Closes: https://bugs.gentoo.org/873802
8 Signed-off-by: Sam James <sam@g.o>
9 ---
10 eclass/xdg-utils.eclass | 5 +++--
11 1 file changed, 3 insertions(+), 2 deletions(-)
12
13 diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
14 index ae2b71cd2495..9a58add23d36 100644
15 --- a/eclass/xdg-utils.eclass
16 +++ b/eclass/xdg-utils.eclass
17 @@ -1,4 +1,4 @@
18 -# Copyright 2004-2021 Gentoo Authors
19 +# Copyright 2004-2022 Gentoo Authors
20 # Distributed under the terms of the GNU General Public License v2
21
22 # @ECLASS: xdg-utils.eclass
23 @@ -42,9 +42,10 @@ xdg_environment_reset() {
24 export XDG_DATA_HOME="${HOME}/.local/share"
25 export XDG_CONFIG_HOME="${HOME}/.config"
26 export XDG_CACHE_HOME="${HOME}/.cache"
27 + export XDG_STATE_HOME="${HOME}/.local/state"
28 export XDG_RUNTIME_DIR="${T}/run"
29 mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \
30 - "${XDG_RUNTIME_DIR}" || die
31 + "${XDG_STATE_HOME}" "${XDG_RUNTIME_DIR}" || die
32 # This directory needs to be owned by the user, and chmod 0700
33 # https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
34 chmod 0700 "${XDG_RUNTIME_DIR}" || die
35 --
36 2.37.3

Replies