From 590e4154b683b5efc53269b1c493f48e3d862f48 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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/scripts/archive.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'guix/scripts/archive.scm') diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index 66000435b4..3b778d8151 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.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. ;;; @@ -19,6 +19,7 @@ (define-module (guix scripts archive) #:use-module (guix config) #:use-module (guix utils) + #:use-module ((guix build utils) #:select (mkdir-p)) #:use-module (guix store) #:use-module (guix packages) #:use-module (guix derivations) @@ -250,6 +251,7 @@ (define (generate-key-pair parameters) ;; Create the following files as #o400. (umask #o266) + (mkdir-p (dirname %public-key-file)) (with-atomic-file-output %public-key-file (lambda (port) (display (canonical-sexp->string public) port))) -- cgit v1.2.3