[pve-devel] [PATCH kernel-meta 01/10] efiboot: actually sync last kernel of old series

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jul 12 15:16:42 CEST 2019


and not just keep it from being autoremoved

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    this makes it more in-line with docs, which currently say:
    
    'the latest version of each kernel series (e.g. 4.15, 5.0).'
    
    will send a separate patch for -docs once this is applied.

 efiboot/functions | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/efiboot/functions b/efiboot/functions
index 79062d8..293d4c0 100755
--- a/efiboot/functions
+++ b/efiboot/functions
@@ -41,11 +41,15 @@ kernel_keep_versions() {
 
 	series_metapackages="$(echo "$sorted_list" | grep -Ev '^[^ ]+-pve')"
 
+	oldseries="$(echo "$series_metapackages" | head -n2 | tail -n1)"
+	oldseries_latest_kernel="$(echo "$sorted_list" | grep -E "^${oldseries}\.[^ ]+-pve" | head -n1 )"
+
 	kernels="$(cat <<-EOF
 		$running_version
 		$install_version
 		$latest_2_versions
 		$series_metapackages
+		$oldseries_latest_kernel
 		EOF
 	)"
 
-- 
2.20.1





More information about the pve-devel mailing list