From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJc9n-0003Yr-V4 for guix-patches@gnu.org; Sat, 10 Jun 2017 04:54:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJc9j-0005Sf-2A for guix-patches@gnu.org; Sat, 10 Jun 2017 04:54:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJc9i-0005SV-UN for guix-patches@gnu.org; Sat, 10 Jun 2017 04:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJc9i-0002MB-HM for guix-patches@gnu.org; Sat, 10 Jun 2017 04:54:02 -0400 Subject: bug#26339: [PATCH] bootloader: Rename boot-name to bootloader-name. References: <20170402134916.2871-1-m.othacehe@gmail.com> In-Reply-To: <20170402134916.2871-1-m.othacehe@gmail.com> Resent-Message-ID: From: Mathieu Othacehe Date: Sat, 10 Jun 2017 10:53:27 +0200 Message-Id: <20170610085327.1353-1-m.othacehe@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26339@debbugs.gnu.org * gnu/system.scm: Rename boot-name -> bootloader-name. * guix/scripts/system.scm: Rename boot-name -> bootloader-name. --- Hi, Here's a small patch to rename boot-name to bootloader-name. If a previous "parameters" files contains "boot-name" instead of now expected bootloader-name, 'grub bootloader will be set as default. Thanks, Mathieu gnu/system.scm | 16 ++++++++-------- guix/scripts/system.scm | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 96ef06a48..228bf410c 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -104,7 +104,7 @@ boot-parameters? boot-parameters-label boot-parameters-root-device - boot-parameters-boot-name + boot-parameters-bootloader-name boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -216,7 +216,7 @@ directly by the user." ;; exactly to the device field of the object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) - (boot-name boot-parameters-boot-name) + (bootloader-name boot-parameters-bootloader-name) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -235,8 +235,8 @@ directly by the user." (label label) (root-device root) - (boot-name - (match (assq 'boot-name rest) + (bootloader-name + (match (assq 'bootloader-name rest) ((_ args) args) (#f 'grub))) ; for compatibility reasons. @@ -306,7 +306,7 @@ The object has its kernel-arguments extended in order to make it bootable." (boot-parameters (label (menu-entry-label menu-entry)) (root-device #f) - (boot-name 'custom) + (bootloader-name 'custom) (store-device (menu-entry-device menu-entry)) (store-mount-point (menu-entry-device-mount-point menu-entry)) (kernel (menu-entry-linux menu-entry)) @@ -892,7 +892,7 @@ kernel arguments for that derivation to ." (store -> (operating-system-store-file-system os)) (bootloader -> (bootloader-configuration-bootloader (operating-system-bootloader os))) - (boot-name -> (bootloader-name bootloader)) + (bootloader-name -> (bootloader-name bootloader)) (label -> (kernel->boot-label (operating-system-kernel os)))) (return (boot-parameters (label label) @@ -903,7 +903,7 @@ kernel arguments for that derivation to ." (operating-system-kernel-arguments os system.drv root-device) (operating-system-user-kernel-arguments os))) (initrd initrd) - (boot-name boot-name) + (bootloader-name bootloader-name) (store-device (fs->boot-device store)) (store-mount-point (file-system-mount-point store)))))) @@ -929,7 +929,7 @@ being stored into the \"parameters\" file)." (kernel-arguments #$(boot-parameters-kernel-arguments params)) (initrd #$(boot-parameters-initrd params)) - (boot-name #$(boot-parameters-boot-name params)) + (bootloader-name #$(boot-parameters-bootloader-name params)) (store (device #$(boot-parameters-store-device params)) (mount-point #$(boot-parameters-store-mount-point params)))) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index f71b1d71b..35675cc01 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -425,7 +425,7 @@ generation as its default entry. STORE is an open connection to the store." "Return the bootloader name stored in SYSTEM's \"parameters\" file." (let ((params (unless-file-not-found (read-boot-parameters-file system)))) - (boot-parameters-boot-name params))) + (boot-parameters-bootloader-name params))) (define (reinstall-bootloader store number) "Re-install bootloader for existing system profile generation NUMBER. @@ -521,7 +521,7 @@ list of services." (let* ((generation (generation-file-name profile number)) (params (read-boot-parameters-file generation)) (label (boot-parameters-label params)) - (boot-name (boot-parameters-boot-name params)) + (bootloader-name (boot-parameters-bootloader-name params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) @@ -532,7 +532,7 @@ list of services." (format #t (G_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (G_ " label: ~a~%") label) - (format #t (G_ " bootloader: ~a~%") boot-name) + (format #t (G_ " bootloader: ~a~%") bootloader-name) (format #t (G_ " root device: ~a~%") root-device) (format #t (G_ " kernel: ~a~%") kernel)))) -- 2.13.1