[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix gc doesn't seem to clean old guix revision
From: |
Ludovic Courtès |
Subject: |
Re: guix gc doesn't seem to clean old guix revision |
Date: |
Tue, 10 Dec 2019 17:19:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi Yoann,
YOANN P <address@hidden> skribis:
>> It is similar to Bug#36785 [1].
>
>> As said, it is not a bug of "guix pull" but a bug of the
>> configuration. Adding the root user to your Dockerfile should fix the
>> issue you encounter.
>
> The fact that guix require $USER to be set is IMO a kind of bug and is
> documented anywhere.
I had not understood that. I guess the patch below fixes it, I’ll push
it shortly.
Thanks,
Ludo’.
diff --git a/guix/profiles.scm b/guix/profiles.scm
index f5e5cc33d6..616605151e 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1727,7 +1727,9 @@ because the NUMBER is zero.)"
(define %profile-directory
(string-append %state-directory "/profiles/"
(or (and=> (or (getenv "USER")
- (getenv "LOGNAME"))
+ (getenv "LOGNAME")
+ (false-if-exception
+ (passwd:name (getpwuid (getuid)))))
(cut string-append "per-user/" <>))
"default")))