eclass/xdg-utils: Sync with Gentoo

It's from Gentoo commit 75c077cf32fee0bd5c496487e53c68f460775f12.
This commit is contained in:
Krzesimir Nowak 2022-10-21 10:51:33 +02:00
parent 5672e725cf
commit 2e9a1c5b5b

View File

@ -1,4 +1,4 @@
# Copyright 2004-2021 Gentoo Authors # Copyright 2004-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: xdg-utils.eclass # @ECLASS: xdg-utils.eclass
@ -42,9 +42,10 @@ xdg_environment_reset() {
export XDG_DATA_HOME="${HOME}/.local/share" export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_CONFIG_HOME="${HOME}/.config" export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache" export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_STATE_HOME="${HOME}/.local/state"
export XDG_RUNTIME_DIR="${T}/run" export XDG_RUNTIME_DIR="${T}/run"
mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \ mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \
"${XDG_RUNTIME_DIR}" || die "${XDG_STATE_HOME}" "${XDG_RUNTIME_DIR}" || die
# This directory needs to be owned by the user, and chmod 0700 # This directory needs to be owned by the user, and chmod 0700
# https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html # https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
chmod 0700 "${XDG_RUNTIME_DIR}" || die chmod 0700 "${XDG_RUNTIME_DIR}" || die