GNU bug report logs -
#61982
[PATCH 0/2] Respect XDG Base Directory Specification 0.8.
Previous Next
Reported by: Bruno Victal <mirai <at> makinata.eu>
Date: Sun, 5 Mar 2023 15:18:02 UTC
Severity: normal
Tags: patch
Done: Andrew Tropin <andrew <at> trop.in>
Bug is archived. No further changes may be made.
Full log
Message #58 received at 61982 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Thu, Jun 15, 2023, at 5:35 AM, Andrew Tropin wrote:
>
> WDYT about adding (home-log-dir) function to (guix build utils)?
> So we can prevent copypasting the same code all over home modules.
>
> Something like:
> --8<---------------cut here---------------start------------->8---
> (define (home-log-dir)
> "Returns a directory for user applications logs."
> (string-append
> (or (getenv "XDG_STATE_HOME")
> (format #f "~a/.local/state"
> (getenv "HOME")))
> "/log"))
> --8<---------------cut here---------------end--------------->8---
>
I still think idiomatic XDG structure is NOT to have a "/log" subdirectory like this, as I explained in <https://issues.guix.gnu.org/61982#7>.
Aside from that, though, I thought the conclusion from <https://issues.guix.gnu.org/56050#3> was that it is the responsibility of Guix System or the installation mechanism for Guix on a foreign distribution (e.g. "/etc/profile.d/zzz-guix.sh") to initialize all of the XDG variables, so code like this can use `(getenv "XDG_STATE_HOME")` unconditionally (or indeed with a checked assertion). Maybe there's some context I'm forgetting, though. I've been looking into these things again as I attempt to solve <https://lists.gnu.org/archive/html/help-guix/2023-06/msg00031.html>: I noticed in the attached environment variables that entries under /home/philip/.guix-home/profile/ are duplicated in many search paths.
-Philip
This bug report was last modified 2 years and 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.