guix system: Write the GC root on the target file system.

Fixes <http://bugs.gnu.org/22802>.
Reported by Jookia <166291@gmail.com>.

* guix/scripts/system.scm (install-grub*): Prepend TARGET to GC-ROOT.
This commit is contained in:
Ludovic Courtès 2016-03-08 11:03:02 +01:00
parent 16f4acbddb
commit 16210486e6

View file

@ -128,7 +128,8 @@ (define* (copy-closure item target
(define (install-grub* grub.cfg device target)
"This is a variant of 'install-grub' with error handling, lifted in
%STORE-MONAD"
(let* ((gc-root (string-append %gc-roots-directory "/grub.cfg"))
(let* ((gc-root (string-append target %gc-roots-directory
"/grub.cfg"))
(temp-gc-root (string-append gc-root ".new"))
(delete-file (lift1 delete-file %store-monad))
(make-symlink (lift2 switch-symlinks %store-monad))