diff --git a/srcpkgs/base-files/files/vkpurge b/srcpkgs/base-files/files/vkpurge index 7a20b0335a0..ccfedf9a9e4 100644 --- a/srcpkgs/base-files/files/vkpurge +++ b/srcpkgs/base-files/files/vkpurge @@ -23,14 +23,15 @@ _EOF list_kernels() { - local k kpkg installed kver kvertmp skip + local k kpkg installed kver kvertmp skip _f - for k in /var/lib/initramfs-tools/*; do - kver=$(basename $k) - kvertmp=$(basename $k|sed -e 's|-rc|rc|') + for k in /boot/initramfs-*.img; do + _f=$(basename $k) + kver=$(xbps-uhelper getpkgversion ${_f}) + kvertmp=$(xbps-uhelper getpkgversion ${_f}|sed -e 's|-rc|rc|') for kpkg in kernel kernel-snapshot; do installed=$(xbps-uhelper -r / version $kpkg) - if [ "$installed" = "$kvertmp" ]; then + if [ "$installed" = "${kvertmp%.img}" ]; then skip=1 break fi @@ -39,7 +40,7 @@ list_kernels() unset skip continue fi - echo "$kver" + echo "${kver%.img}" done } @@ -88,11 +89,6 @@ remove_kernel() fi # Execute post-remove kernel hooks. run_hooks post-remove $rmkver - - # Make sure there are no stale files. - if [ -f /var/lib/initramfs-tools/${rmkver} ]; then - rm -f /var/lib/initramfs-tools/${rmkver} - fi } if [ "$1" = "list" ]; then diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template index 51d9ecb6f4f..a08dc50c3b7 100644 --- a/srcpkgs/base-files/template +++ b/srcpkgs/base-files/template @@ -1,6 +1,8 @@ # Template file for 'base-files' pkgname=base-files -version=0.62 +version=0.63 +noarch=yes +bootstrap=yes fulldepends="base-directories xbps-triggers" short_desc="Void GNU/Linux base system files" maintainer="Juan RP " @@ -10,9 +12,6 @@ long_desc=" This package installs the base system files that aren't installed by any other package and are required on any GNU/Linux system." -noarch=yes -bootstrap=yes - conf_files=" /etc/inputrc /etc/profile @@ -25,7 +24,6 @@ conf_files=" /etc/skel/.inputrc /etc/issue" - do_install() { # Install misc config files. for f in bash_logout bash_profile bashrc inputrc; do @@ -49,5 +47,5 @@ do_install() { install -m644 ${FILESDIR}/licenses/* ${DESTDIR}/usr/share/licenses # vkpurge - vinstall ${FILESDIR}/vkpurge 755 sbin vkpurge + vinstall ${FILESDIR}/vkpurge 755 usr/sbin vkpurge }