guix system: Always build grub.cfg for 'init' and 'reconfigure'.
authorLudovic Courtès <ludo@gnu.org>
Mon, 2 Nov 2015 21:44:17 +0000 (22:44 +0100)
committerLudovic Courtès <ludo@gnu.org>
Mon, 2 Nov 2015 21:49:04 +0000 (22:49 +0100)
Fixes <http://bugs.gnu.org/21068>.
Reported by Germano Gabbianelli <tyrion.mx@gmail.com>
and Mark H Weaver <mhw@netris.org>.

* guix/scripts/system.scm (perform-action): Always add GRUB.CFG to DRVS
  for 'init' and 'reconfigure'.

Co-authored-by: Mark H Weaver <mhw@netris.org>
guix/scripts/system.scm

index 7a8a751..0d54d45 100644 (file)
@@ -447,8 +447,14 @@ building anything."
                                                  (if (eq? 'init action)
                                                      '()
                                                      (previous-grub-entries)))))
-       (drvs   -> (if (and grub? (memq action '(init reconfigure)))
-                      (list sys grub grub.cfg)
+
+       ;; For 'init' and 'reconfigure', always build GRUB.CFG, even if
+       ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC
+       ;; root.  See <http://bugs.gnu.org/21068>.
+       (drvs   -> (if (memq action '(init reconfigure))
+                      (if grub?
+                          (list sys grub.cfg grub)
+                          (list sys grub.cfg))
                       (list sys)))
        (%         (if derivations-only?
                       (return (for-each (compose println derivation-file-name)