base-files: Prevent 'vkpurge list' from displaying errors at unknown kernel files

This commit is contained in:
Stefan Mühlinghaus 2015-01-20 19:58:25 +01:00
parent 8182d50862
commit a77cfff366
2 changed files with 4 additions and 3 deletions

View file

@ -23,14 +23,15 @@ _EOF
list_kernels() list_kernels()
{ {
local k kpkg installed kver skip _f local k kpkg installed kver _f
for k in /boot/vmlinuz-*; do for k in /boot/vmlinuz-*; do
_f=$(basename $k) _f=$(basename $k)
kver=$(echo ${_f}|sed -e 's|-rc|rc|') kver=$(echo ${_f}|sed -e 's|-rc|rc|')
installed=$(xbps-query -o "$k" 2>/dev/null) installed=$(xbps-query -o "$k" 2>/dev/null)
[ -n "$installed" ] && continue [ -n "$installed" ] && continue
echo "$(xbps-uhelper getpkgversion ${_f})" kpkg="$(xbps-uhelper getpkgversion ${_f} 2>/dev/null)"
[ -n "$kpkg" ] && echo "$kpkg"
done done
} }

View file

@ -1,7 +1,7 @@
# Template file for 'base-files' # Template file for 'base-files'
pkgname=base-files pkgname=base-files
version=0.114 version=0.114
revision=2 revision=3
bootstrap=yes bootstrap=yes
build_style="meta" build_style="meta"
depends="base-directories xbps-triggers" depends="base-directories xbps-triggers"