~ruther/guix-local

eef4096c14568deae818287d23ad5da6a2f41d92 — Ludovic Courtès 11 years ago dc34393
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.
1 files changed, 7 insertions(+), 3 deletions(-)

M guix/scripts/system.scm
M guix/scripts/system.scm => guix/scripts/system.scm +7 -3
@@ 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)