From eef4096c14568deae818287d23ad5da6a2f41d92 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 18 Jun 2014 23:19:01 +0200 Subject: guix system: 'init' makes sure the target store directory exists. * guix/scripts/system.scm (install): Before calling 'copy-closure', make sure directory (%store-prefix) under TARGET exists. --- guix/scripts/system.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'guix') 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 @@ (define to-copy (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) -- cgit v1.2.3