aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-06-20 23:44:42 +0200
committerLudovic Courtès <ludo@gnu.org>2014-06-20 23:44:42 +0200
commitf513527a8ed3faa0ed45f027430c69be97d9ca02 (patch)
treea23ecdebf45d6afcad7f09e853e90c159888cdc5 /guix/scripts
parent2eea253f4ddefa12a476f22d52928227d971a7fa (diff)
parent00fe93338d5cd29b4d565749b5842a7477d0477c (diff)
downloadgnu-guix-f513527a8ed3faa0ed45f027430c69be97d9ca02.tar
gnu-guix-f513527a8ed3faa0ed45f027430c69be97d9ca02.tar.gz
Merge branch 'core-updates'
Diffstat (limited to 'guix/scripts')
-rwxr-xr-xguix/scripts/substitute-binary.scm12
-rw-r--r--guix/scripts/system.scm10
2 files changed, 16 insertions, 6 deletions
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm
index 4bca8c2e88..ec7596efb6 100755
--- a/guix/scripts/substitute-binary.scm
+++ b/guix/scripts/substitute-binary.scm
@@ -592,9 +592,14 @@ Internal tool to substitute a pre-built binary to a local build.\n"))
(let ((key (call-with-input-file %public-key-file
(compose string->canonical-sexp
get-string-all))))
- (equal? (acl->public-keys acl) (list key)))))
-
- (let ((acl (current-acl)))
+ (match acl
+ ((thing)
+ (equal? (canonical-sexp->string thing)
+ (canonical-sexp->string key)))
+ (_
+ #f)))))
+
+ (let ((acl (acl->public-keys (current-acl))))
(when (or (null? acl) (singleton? acl))
(warning (_ "ACL for archive imports seems to be uninitialized, \
substitutes may be unavailable\n")))))
@@ -603,6 +608,7 @@ substitutes may be unavailable\n")))))
"Implement the build daemon's substituter protocol."
(mkdir-p %narinfo-cache-directory)
(maybe-remove-expired-cached-narinfo)
+ (check-acl-initialized)
;; Starting from commit 22144afa in Nix, we are allowed to bail out directly
;; when we know we cannot substitute, but we must emit a newline on stdout
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 345d8c3e5f..7a4a2a6a06 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -100,9 +100,13 @@ When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
(if (string=? target "/")
(warning (_ "initializing the current root file system~%"))
- ;; Copy items to the new store.
- (for-each (cut copy-closure store <> target #:log-port log-port)
- to-copy))
+ (begin
+ ;; Make sure the target store exists.
+ (mkdir-p (string-append target (%store-prefix)))
+
+ ;; Copy items to the new store.
+ (for-each (cut copy-closure store <> target #:log-port log-port)
+ to-copy)))
;; Create a bunch of additional files.
(format log-port "populating '~a'...~%" target)