diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-06-19 23:35:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-06-19 23:35:41 +0200 |
commit | 00fe93338d5cd29b4d565749b5842a7477d0477c (patch) | |
tree | 983f2acfa097517dba906f53bff95497479accb8 | |
parent | 080571eeac3f38e957434d5dda7568218a5a89dc (diff) | |
download | guix-00fe93338d5cd29b4d565749b5842a7477d0477c.tar guix-00fe93338d5cd29b4d565749b5842a7477d0477c.tar.gz |
substitute-binary: Warn about uninitialized ACL.
* guix/scripts/substitute-binary.scm (guix-substitute-binary): Call
'check-acl-initialized'.
(check-acl-initialized): Don't rely on 'equal?' to compare keys.
Instead, convert keys to strings.
-rwxr-xr-x | guix/scripts/substitute-binary.scm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm index c70a4f626c..e2167c63cb 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 |