summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-11-29 15:11:51 +0100
committerLudovic Courtès <ludo@gnu.org>2019-11-29 15:54:20 +0100
commit3f8e890d91975a26ecb417e9115805159aa3170d (patch)
treec06a128b872cd36da89006f3a1dbed8f352ebf06 /guix/ui.scm
parent55e1dfa4dd189e010c541e3997b65434c702b4a5 (diff)
downloadguix-patches-3f8e890d91975a26ecb417e9115805159aa3170d.tar
guix-patches-3f8e890d91975a26ecb417e9115805159aa3170d.tar.gz
ui: 'with-profile-lock' keeps going upon ENOLCK.
* guix/build/syscalls.scm (call-with-file-lock/no-wait): Really pass ARGS to HANDLER. Return #f when HANDLER is called. * guix/ui.scm (profile-lock-handler): Emit a mere warning upon ENOLCK.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index f4aa6e291e..540671f3dd 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1666,8 +1666,13 @@ DURATION-RELATION with the current time."
(define (profile-lock-handler profile errno . _)
"Handle failure to acquire PROFILE's lock."
- (leave (G_ "profile ~a is locked by another process~%")
- profile))
+ ;; NFS mounts can return ENOLCK. When that happens, there's not much that
+ ;; can be done, so warn the user and keep going.
+ (if (= errno ENOLCK)
+ (warning (G_ "cannot lock profile ~a: ~a~%")
+ profile (strerror errno))
+ (leave (G_ "profile ~a is locked by another process~%")
+ profile)))
(define profile-lock-file
(cut string-append <> ".lock"))