aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-08-28 23:31:28 +0200
committerLudovic Courtès <ludo@gnu.org>2019-08-30 01:33:45 +0200
commitc3e59de9b1340f1a0ef7e30dd2e4e7bf7b484ee9 (patch)
treed816f6136b5202eaa1cadd6d2ee6a4c61e2b4eb1
parenta28cfee841e9c5ab179291d3065f1486fd065e7e (diff)
downloadpatches-c3e59de9b1340f1a0ef7e30dd2e4e7bf7b484ee9.tar
patches-c3e59de9b1340f1a0ef7e30dd2e4e7bf7b484ee9.tar.gz
guix system: Reinstalling the bootloader preserves extra menu entries.
Fixes <https://bugs.gnu.org/36876>. Reported by Jesse Gibbons <jgibbons2357@gmail.com>. Previously 'guix system delete-generations' or 'switch-generation' would lose the extra bootloader menu entries specified in the current system's configuration. This fixes that. * guix/scripts/system.scm (reinstall-bootloader): Turn PARAMS into a single <boot-parameters>. Adjust ENTRIES to include extra menu entries specified in PARAMS.
-rw-r--r--guix/scripts/system.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 9fc3a10e98..27b014db68 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -384,12 +384,14 @@ STORE is an open connection to the store."
(bootloader bootloader)))
;; Make the specified system generation the default entry.
- (params (profile-boot-parameters %system-profile (list number)))
+ (params (first (profile-boot-parameters %system-profile
+ (list number))))
(old-generations
(delv number (reverse (generation-numbers %system-profile))))
(old-params (profile-boot-parameters
%system-profile old-generations))
- (entries (map boot-parameters->menu-entry params))
+ (entries (cons (boot-parameters->menu-entry params)
+ (boot-parameters-bootloader-menu-entries params)))
(old-entries (map boot-parameters->menu-entry old-params)))
(run-with-store store
(mlet* %store-monad