From 590e4154b683b5efc53269b1c493f48e3d862f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 5 Jan 2014 23:40:06 +0100 Subject: archive: Make sure $sysconfdir/guix exists. * guix/pki.scm (ensure-acl): Make sure the directory of %ACL-FILE exists. * guix/scripts/archive.scm (generate-key-pair): Likewise for %PUBLIC-KEY-FILE. --- guix/pki.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'guix/pki.scm') diff --git a/guix/pki.scm b/guix/pki.scm index dc8139fbc9..5e4dbadd35 100644 --- a/guix/pki.scm +++ b/guix/pki.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013, 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +20,7 @@ #:use-module (guix config) #:use-module (guix pk-crypto) #:use-module ((guix utils) #:select (with-atomic-file-output)) + #:use-module ((guix build utils) #:select (mkdir-p)) #:use-module (ice-9 match) #:use-module (rnrs io ports) #:export (%public-key-file @@ -82,6 +83,7 @@ element in KEYS must be a canonical sexp with type 'public-key'." (let ((public-key (call-with-input-file %public-key-file (compose string->canonical-sexp get-string-all)))) + (mkdir-p (dirname %acl-file)) (with-atomic-file-output %acl-file (lambda (port) (display (canonical-sexp->string -- cgit v1.2.3