From 55e1dfa4dd189e010c541e3997b65434c702b4a5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 29 Nov 2019 14:53:22 +0100 Subject: ui: Factorize 'with-profile-lock'. * guix/ui.scm (profile-lock-handler, profile-lock-file): New procedures. (with-profile-lock): New macro. * guix/scripts/package.scm (process-actions): Use 'with-profile-lock' instead of 'with-file-lock/no-wait'. * guix/scripts/pull.scm (guix-pull): Likewise. --- guix/scripts/pull.scm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'guix/scripts/pull.scm') diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 7f37c156e8..19410ad141 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -866,11 +866,7 @@ Use '~/.config/guix/channels.scm' instead.")) (if (assoc-ref opts 'bootstrap?) %bootstrap-guile (canonical-package guile-2.2))))) - (with-file-lock/no-wait (string-append profile ".lock") - (lambda (key . args) - (leave (G_ "profile ~a is locked by another process~%") - profile)) - + (with-profile-lock profile (run-with-store store (build-and-install instances profile #:dry-run? -- cgit v1.2.3