diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-12-12 09:02:49 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-12-12 09:02:49 -0500 |
commit | f184be73defd62f46a14dbdb96df3fa61806f3be (patch) | |
tree | 842b127645c7a3f5ef6383262a3358a3340e4cda /guix/scripts | |
parent | c9974889ef69fbe6199a9bb1cb2fa5a594130114 (diff) | |
parent | 94e9651241b3e827531779717952d386535801f3 (diff) |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/environment.scm | 15 | ||||
-rwxr-xr-x | guix/scripts/substitute.scm | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 64597f6e9f..ab11b35335 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -728,14 +728,21 @@ WHILE-LIST." (home (getenv "HOME")) (uid (if user 1000 (getuid))) (gid (if user 1000 (getgid))) - (passwd (let ((pwd (getpwuid (getuid)))) + + ;; On a foreign distro, the name service switch might be + ;; dysfunctional and 'getpwuid' throws. Don't let that hamper + ;; operations. + (passwd (let ((pwd (false-if-exception (getpwuid (getuid))))) (password-entry - (name (or user (passwd:name pwd))) - (real-name (if user + (name (or user + (and=> pwd passwd:name) + (getenv "USER") + "charlie")) + (real-name (if (or user (not pwd)) "" (passwd:gecos pwd))) (uid uid) (gid gid) (shell bash) - (directory (if user + (directory (if (or user (not pwd)) (string-append "/home/" user) (passwd:dir pwd)))))) (groups (list (group-entry (name "users") (gid gid)) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index cf59db4315..0efa61b0d7 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -366,7 +366,7 @@ authorized substitutes." When FRESH? is true, delete any cached connections for URI and open a new one. Return #f if URI's scheme is 'file' or #f. -When true, TIMEOUT is the maximum number of milliseconds to wait for +When true, TIMEOUT is the maximum number of seconds to wait for connection establishment. When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates." (define host (uri-host uri)) |