guix system: init: Copy the closure of 'grub.cfg', not that of the system.

Fixes <http://bugs.gnu.org/20591>.
Reported by Daniel Pimentel <d4n1@openmailbox.org>.

* guix/scripts/system.scm (install): Copy the closure of GRUB.CFG rather than
  that of OS-DIR.
This commit is contained in:
Ludovic Courtès 2015-05-24 17:20:24 +02:00
parent 328639e48f
commit f245b03deb
1 changed files with 6 additions and 3 deletions

View File

@ -128,8 +128,9 @@ TARGET, and register them."
(define* (install os-drv target (define* (install os-drv target
#:key (log-port (current-output-port)) #:key (log-port (current-output-port))
grub? grub.cfg device) grub? grub.cfg device)
"Copy the output of OS-DRV and its dependencies to directory TARGET. TARGET "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to
must be an absolute directory name since that's what 'guix-register' expects. directory TARGET. TARGET must be an absolute directory name since that's what
'guix-register' expects.
When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG." When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
(define (maybe-copy to-copy) (define (maybe-copy to-copy)
@ -160,7 +161,9 @@ the ownership of '~a' may be incorrect!~%")
(populate (lift2 populate-root-file-system %store-monad))) (populate (lift2 populate-root-file-system %store-monad)))
(mbegin %store-monad (mbegin %store-monad
(maybe-copy os-dir) ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's
;; background image and so on.
(maybe-copy grub.cfg)
;; Create a bunch of additional files. ;; Create a bunch of additional files.
(format log-port "populating '~a'...~%" target) (format log-port "populating '~a'...~%" target)