From: Brice Waegeneire <brice@waegenei.re>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 53781@debbugs.gnu.org
Subject: [bug#53781] [PATCH shepherd] support: Use XDG_STATE_HOME for log files.
Date: Sat, 12 Feb 2022 11:37:26 +0100 [thread overview]
Message-ID: <87leygweu1.fsf@waegenei.re> (raw)
In-Reply-To: <062d00aaa485dd2c8524f6822a524cb3cb3bdc55.camel@gmail.com> (Liliana Marie Prikler's message of "Fri, 4 Feb 2022 09:07:09 +0100")
Hello Liliana,
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> As per XDG Base Directory Specification 0.8, "action history" (such as logs)
> ought to be stored in $XDG_STATE_HOME, defaulting to $HOME/.local/state.
> Respect this specification.
>
> * modules/shepherd/support.scm (%user-log-dir): Define in terms of
> XDG_STATE_HOME.
> * doc/shepherd.texi: Adjust accordingly.
> * tests/basic.sh: Adjust accordingly.
> ---
> doc/shepherd.texi | 3 ++-
> modules/shepherd/support.scm | 4 ++--
> tests/basic.sh | 4 +++-
> 3 files changed, 7 insertions(+), 4 deletions(-)
[...]
> diff --git a/tests/basic.sh b/tests/basic.sh
> index 5079aa1..5ef1fb0 100644
> --- a/tests/basic.sh
> +++ b/tests/basic.sh
> @@ -260,7 +260,9 @@ test -f "$log"
>
> # Set XDG_CONFIG_HOME for configuration files.
> export XDG_CONFIG_HOME=$confdir
> -export XDG_DATA_DIR=$datadir
> +export XDG_DATA_HOME=$datadir
> +# Reuse XDG_DATA_HOME as XDG_STATE_HOME for backwards compatibility.
> +export XDG_STATE_HOME=$datadir
> mkdir -p $confdir/shepherd
> mkdir -p $datadir/shepherd
> mv $conf $confdir/shepherd/init.scm
I don't get why you define XDG_DATA_HOME here, as it wasn't used before and it
is a test and shouldn't need to be backward compatible except for testing such
backward compatibility.
Otherwise it LGTM! Thank you for the patch.
Cheers,
- Brice
next prev parent reply other threads:[~2022-02-12 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 8:07 [bug#53781] [PATCH shepherd] support: Use XDG_STATE_HOME for log files Liliana Marie Prikler
2022-02-12 10:37 ` Brice Waegeneire [this message]
2022-03-24 22:10 ` bug#53781: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87leygweu1.fsf@waegenei.re \
--to=brice@waegenei.re \
--cc=53781@debbugs.gnu.org \
--cc=liliana.prikler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).