GNU bug report logs - #66659
(home-)on-first-login script broken when no gexps are added

Previous Next

Package: guix;

Reported by: Nils Landt <nils <at> landt.email>

Date: Sat, 21 Oct 2023 06:15:01 UTC

Severity: normal

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 66659 <at> debbugs.gnu.org (full text, mbox):

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 66659 <at> debbugs.gnu.org
Subject: [PATCH] home: services: Don't crash on-first-login when nothing to do
Date: Sat, 21 Oct 2023 20:39:21 +1100
* gnu/home/services.scm (compute-on-first-login-script): Ensure that WHEN is
syntactically valid in expansion.
---
 gnu/home/services.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 651c068f79..3f018e3893 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -435,7 +435,10 @@ (define (compute-on-first-login-script _ gexps)
          ;; after complete logout/reboot.
          (if (file-exists? xdg-runtime-dir)
              (when (claim-first-run flag-file-path)
-               #$@gexps)
+               #$@gexps
+               ;; An empty WHEN body is not syntactically valid, so we put an
+               ;; arbitrary form here to ensure it's not empty.
+               #t)
              ;; TRANSLATORS: 'on-first-login' is the name of a service and
              ;; shouldn't be translated
              (warning (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script

base-commit: 80c8f5b57aa3699445fab29e0f75f5955e697509
-- 
2.41.0





This bug report was last modified 1 year and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.