From e5fde74621973e54cdb2983361b90180b5367e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Mon, 22 Apr 2019 14:44:22 +0200 Subject: [PATCH 2/3] system: Provide locale information to the bootloader. * gnu/bootloader/depthcharge.scm (depthcharge-configuration-file): Add locale keyword. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Likewise. * gnu/bootloader/grub.scm (grub-configuration-file): Likewise. * gnu/system.scm (operating-system-bootcfg): Provide locale information to the bootloader. * guix/system/script.scm (reinstall-bootloader): Use locale information from boot-parameters. --- gnu/bootloader/depthcharge.scm | 3 ++- gnu/bootloader/extlinux.scm | 3 ++- gnu/bootloader/grub.scm | 3 ++- gnu/system.scm | 4 +++- guix/scripts/system.scm | 4 +++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gnu/bootloader/depthcharge.scm b/gnu/bootloader/depthcharge.scm index 58cc3f3932..0e0c17a255 100644 --- a/gnu/bootloader/depthcharge.scm +++ b/gnu/bootloader/depthcharge.scm @@ -82,7 +82,8 @@ (define* (depthcharge-configuration-file config entries #:key (system (%current-system)) - (old-entries '())) + (old-entries '()) + (locale #f)) (match entries ((entry) (let ((kernel (menu-entry-linux entry)) diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm index 40108584a8..e4ccc47484 100644 --- a/gnu/bootloader/extlinux.scm +++ b/gnu/bootloader/extlinux.scm @@ -28,7 +28,8 @@ (define* (extlinux-configuration-file config entries #:key (system (%current-system)) - (old-entries '())) + (old-entries '()) + (locale #f)) "Return the U-Boot configuration file corresponding to CONFIG, a object, and where the store is available at STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu entries diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index e97a17b3e2..446f90157c 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -316,7 +316,8 @@ code." (define* (grub-configuration-file config entries #:key (system (%current-system)) - (old-entries '())) + (old-entries '()) + (locale #f)) "Return the GRUB configuration file corresponding to CONFIG, a object, and where the store is available at STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu diff --git a/gnu/system.scm b/gnu/system.scm index 385d93150c..5732382a3a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -962,6 +962,7 @@ entry." a list of , to populate the \"old entries\" menu." (let* ((root-fs (operating-system-root-file-system os)) (root-device (file-system-device root-fs)) + (locale (operating-system-locale os)) (params (operating-system-boot-parameters os root-device #:system-kernel-arguments? #t)) @@ -972,7 +973,8 @@ a list of , to populate the \"old entries\" menu." (bootloader-configuration-bootloader bootloader-conf))) (generate-config-file bootloader-conf (list entry) - #:old-entries old-entries))) + #:old-entries old-entries + #:locale locale))) (define* (operating-system-boot-parameters os root-device #:key system-kernel-arguments?) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 78aa6cf644..d3e0964aa9 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -492,6 +492,7 @@ STORE is an open connection to the store." ;; Make the specified system generation the default entry. (params (profile-boot-parameters %system-profile (list number))) + (locale (boot-parameters-locale params)) (old-generations (delv number (reverse (generation-numbers %system-profile)))) (old-params (profile-boot-parameters @@ -503,7 +504,8 @@ STORE is an open connection to the store." ((bootcfg (lower-object ((bootloader-configuration-file-generator bootloader) bootloader-config entries - #:old-entries old-entries))) + #:old-entries old-entries + #:locale locale))) (bootcfg-file -> (bootloader-configuration-file bootloader)) (target -> "/") (drvs -> (list bootcfg))) -- 2.21.0