base-files: improved vkpurge to detect obsoletes kernel-snapshot pkgs.

This commit is contained in:
Juan RP 2012-06-09 09:08:05 +02:00
parent a4838f298e
commit 83b9750b4a
2 changed files with 8 additions and 9 deletions

View file

@ -23,15 +23,14 @@ _EOF
list_kernels()
{
local k kpkg installed kver kvertmp skip _f
local k kpkg installed kver skip _f
for k in /boot/initramfs-*.img; do
for k in /lib/modules/*; do
_f=$(basename $k)
kver=$(xbps-uhelper getpkgversion ${_f})
kvertmp=$(xbps-uhelper getpkgversion ${_f}|sed -e 's|-rc|rc|')
kver=$(echo ${_f}|sed -e 's|-rc|rc|')
for kpkg in kernel kernel-snapshot; do
installed=$(xbps-uhelper -r / version $kpkg)
if [ "$installed" = "${kvertmp%.img}" ]; then
if [ "$installed" = "${kver}" ]; then
skip=1
break
fi
@ -40,7 +39,7 @@ list_kernels()
unset skip
continue
fi
echo "${kver%.img}"
echo "${kver}"
done
}

View file

@ -1,10 +1,10 @@
# Template file for 'base-files'
pkgname=base-files
version=0.64
version=0.65
revision=1
noarch=yes
bootstrap=yes
fulldepends="base-directories xbps-triggers"
revision=1
short_desc="Void GNU/Linux base system files"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://code.google.com/p/xbps"
@ -43,7 +43,7 @@ do_install() {
usb-load-ehci-first.conf
vinstall ${FILESDIR}/blacklist.conf 644 etc/modprobe.d
# Install comman licenses, from Debian.
# Install common licenses, from Debian.
vmkdir usr/share/licenses
install -m644 ${FILESDIR}/licenses/* ${DESTDIR}/usr/share/licenses