From eaba54b7f31acdfda8278ccce66b09291c58ac82 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 27 Apr 2022 18:18:08 -0700 Subject: DISK:VOLUME-BOOTLOADER -> DISK:VOLUME-BOOTLOADERS Signed-off-by: Sean Whitton --- src/property/disk.lisp | 12 ++++++------ src/property/installer.lisp | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'src/property') diff --git a/src/property/disk.lisp b/src/property/disk.lisp index ca2d2f7..6cc8328 100644 --- a/src/property/disk.lisp +++ b/src/property/disk.lisp @@ -50,13 +50,13 @@ containing this one. If a larger size is required to accommodate the VOLUME-CONTENTS of the volume plus any metadata (e.g. partition tables), this value will be ignored.") - (volume-bootloader - :type list :initarg :boots-with :accessor volume-bootloader + (volume-bootloaders + :type list :initarg :boots-with :accessor volume-bootloaders :documentation - "List specifying a bootloader to be installed to this volume. The first -element is a symbol identifying the type of bootloader, and the remaining -elements are a plist of keyword arguments to be passed to the implementation -of INSTALLER:INSTALL-BOOTLOADER for that bootloader type. + "List or list of lists specifying bootloaders to be installed to this volume. +The first element of each list is a symbol identifying the type of bootloader, +and the remaining elements are a plist of keyword arguments to be passed to +the implementation of INSTALLER:INSTALL-BOOTLOADER for that bootloader type. Typically only the top level PHYSICAL-DISK of a host's volumes will have this slot bound.")) diff --git a/src/property/installer.lisp b/src/property/installer.lisp index 816ca05..813ad10 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -41,10 +41,12 @@ BOOTLOADER-TYPE to VOLUME.")) (defun get-propspecs (volumes running-on-target) (loop for volume in (mapcan #'all-subvolumes volumes) - when (slot-boundp volume 'volume-bootloader) - collect (destructuring-bind (type . args) (volume-bootloader volume) - (apply #'install-bootloader-propspec - type volume running-on-target args)))) + when (slot-boundp volume 'volume-bootloaders) + nconc (loop with bls = (volume-bootloaders volume) + for bootloader in (if (listp (car bls)) bls (list bls)) + collect (destructuring-bind (type . args) bootloader + (apply #'install-bootloader-propspec + type volume running-on-target args))))) ;; At :HOSTATTRS time we don't have the OPENED-VOLUME values required by the ;; :APPLY subroutines which actually install the bootloaders. So we call @@ -124,9 +126,12 @@ install a package providing /usr/sbin/grub-install, but it won't execute it." (:desc "Bootloader binaries installed") (loop for volume in (mapcan #'all-subvolumes (get-hostattrs :volumes)) - when (slot-boundp volume 'volume-bootloader) - collect (destructuring-bind (type . args) (volume-bootloader volume) - (apply #'install-bootloader-binaries-propspec type volume args)) + when (slot-boundp volume 'volume-bootloaders) + nconc (loop with bls = (volume-bootloaders volume) + for bootloader in (if (listp (car bls)) bls (list bls)) + collect (destructuring-bind (type . args) bootloader + (apply #'install-bootloader-binaries-propspec + type volume args))) into propspecs finally (setq propspecs (delete-duplicates propspecs :test #'tree-equal)) -- cgit v1.2.3