diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-07 18:00:28 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-11 17:59:27 +0200 |
commit | 6edc86b44547295d475f98183f604a6c915c9082 (patch) | |
tree | 9c2e729f3d261552f8a8729d3096af559d75d3dd | |
parent | Add new script to find undocumented symbols. (diff) | |
download | calp-6edc86b44547295d475f98183f604a6c915c9082.tar.gz calp-6edc86b44547295d475f98183f604a6c915c9082.tar.xz |
Remove xdg sysconfdir.
It was based on a missunderstanding of the spec. `sysconfdir` is
mentioned, but only as an element of XDG_CONFIG_DIR.
-rw-r--r-- | module/calp/load-config.scm | 9 | ||||
-rw-r--r-- | module/xdg/basedir.scm | 10 |
2 files changed, 7 insertions, 12 deletions
diff --git a/module/calp/load-config.scm b/module/calp/load-config.scm index 5844c1b6..0ce1f131 100644 --- a/module/calp/load-config.scm +++ b/module/calp/load-config.scm @@ -43,8 +43,11 @@ ;; altconfig could be placed in the list below. But I want to raise an error ;; if an explicitly given config is missing. [(find file-exists? - (list - (path-append (xdg-config-home) "calp" "config.scm") - (path-append (xdg-sysconfdir) "calp" "config.scm"))) + (let ((end '("calp" "config.scm"))) + `(,(apply path-append (xdg-config-home) end) + ,@(map (lambda (sysconfdir) + (apply path-append sysconfdir end)) + (xdg-config-dirs)) + ,(apply path-append "/etc" end)))) => identity]) ) diff --git a/module/xdg/basedir.scm b/module/xdg/basedir.scm index 92a5c7d9..664f58e3 100644 --- a/module/xdg/basedir.scm +++ b/module/xdg/basedir.scm @@ -3,7 +3,7 @@ ;;; Code: (define-module (xdg basedir) - :export (sysconfdir runtime-dir + :export (runtime-dir data-home config-home cache-home data-dirs config-dirs)) @@ -28,14 +28,6 @@ (parse-path str) '("/usr/local/share" "/usr/share")))) -;;; sysconfdir -;;; /etc -;;; Techincly not part of the standard, but it's mentioned -(define (sysconfdir) - (or (getenv "sysconfdir") - "/etc")) - - ;;; XDG_CONFIG_DIRS ;;; colon (:) separated, in adddition to XDG_CONFIG_HOME ;;; /etc/xdg |