guix system: Compute 'bootcfg' only for 'init' and 'reconfigure'.

Previously, 'guix system vm' would start by computing the bootcfg
derivation, which itself depended on an incorrect OS derivation (for the
original OS instead of the one passed through
'virtualized-operating-system'.)  That added overhead and would force
the user's config file to define a root file system, for example, even
though it makes no sense in the case of a VM.

* guix/scripts/system.scm (perform-action)[bootcfg]: Limit to the 'init'
and 'reconfigure' actions.
This commit is contained in:
Ludovic Courtès 2019-04-23 23:39:07 +02:00
parent e01bd1a674
commit af41e504cf
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -855,7 +855,7 @@ (define bootloader
(bootloader-configuration-bootloader (operating-system-bootloader os)))
(define bootcfg
(and (not (eq? 'container action))
(and (memq action '(init reconfigure))
(operating-system-bootcfg os menu-entries)))
(define bootloader-script