From e377a81dfdad5922d4dc6fc4f551b40593e34dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 5 Apr 2020 13:33:50 +0700 Subject: [PATCH] base-files: vkpurge: fix for empty /boot On system with empty /boot (example: /boot on external device and not mounted: * `vkpurge list` reports `*`, which is incorrect, and * `vkpurge rm all` run `remove_kernel` for all file names in $PWD, this will normally harmless except when efibootmgr is used and some files with special name, let's say "V" "o" "i" "d" in $PWD, then, efibootmgr will remove all boot entries. Fix it by checking for `vmlinu[xz]-*` explicitly. A sane system shouldn't have that file. --- srcpkgs/base-files/files/vkpurge | 1 + srcpkgs/base-files/template | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge index 97fc88fa635..92098ec736e 100644 --- a/srcpkgs/base-files/files/vkpurge +++ b/srcpkgs/base-files/files/vkpurge @@ -29,6 +29,7 @@ list_kernels() { kver=${k##*-} case "$kver" in "$running") ;; + "*") ;; # /boot isn't mounted -> no vmlinu[xz] $pattern) printf "%s\n" "$kver" ;; esac done diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template index a54f2391c1a..d608bc81f57 100644 --- a/srcpkgs/base-files/template +++ b/srcpkgs/base-files/template @@ -1,7 +1,7 @@ # Template file for 'base-files' pkgname=base-files -version=0.140 -revision=12 +version=0.141 +revision=1 bootstrap=yes depends="xbps-triggers" short_desc="Void Linux base system files"