base-files: improved vkpurge for kernel-snapshot pkgs.
This commit is contained in:
parent
56d421a0a5
commit
c72ccd5015
|
@ -23,13 +23,14 @@ _EOF
|
|||
|
||||
list_kernels()
|
||||
{
|
||||
local k kpkg installed kver skip
|
||||
local k kpkg installed kver kvertmp skip
|
||||
|
||||
for k in /var/lib/initramfs-tools/*; do
|
||||
kver=$(basename $k|sed -e 's|-rc|rc|')
|
||||
kver=$(basename $k)
|
||||
kvertmp=$(basename $k|sed -e 's|-rc|rc|')
|
||||
for kpkg in kernel kernel-snapshot; do
|
||||
installed=$(xbps-uhelper -r / version $kpkg)
|
||||
if [ "$installed" = "$kver" ]; then
|
||||
if [ "$installed" = "$kvertmp" ]; then
|
||||
skip=1
|
||||
break
|
||||
fi
|
||||
|
@ -87,6 +88,11 @@ 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'base-files'
|
||||
pkgname=base-files
|
||||
version=0.55
|
||||
version=0.56
|
||||
short_desc="Void GNU/Linux base system files"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://code.google.com/p/xbps"
|
||||
|
|
Loading…
Reference in New Issue