get-fedora-latest-config: sort result when repoquerying kernel-core

This commit is contained in:
Frédéric Pierret (fepitre) 2019-05-11 11:23:54 +02:00
parent d08d1bf6b4
commit 732780e31f
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -33,7 +33,7 @@ elif [ "x$releasever" == "x" ]; then
fi
# get the latest kernel rpm
latestver=$(dnf -q repoquery kernel-core --disablerepo=* --enablerepo=fedora --enablerepo=updates --releasever="$releasever" | tail -1 | cut -d ':' -f2)
latestver=$(dnf -q repoquery kernel-core --disablerepo=* --enablerepo=fedora --enablerepo=updates --releasever="$releasever" | sort -V | tail -1 | cut -d ':' -f2)
latestrpm="kernel-core-$latestver.rpm"
if [ "$releasever" == 'rawhide' ]; then