tests: fix sorting kernel version
Debian now has 4.9 and 4.19 kernels installed, so `sort -n` sorts them wrong.
This commit is contained in:
parent
5fa75d73be
commit
34e2f3a322
@ -72,7 +72,7 @@ class GrubBase(object):
|
|||||||
elif self.template.startswith('debian-'):
|
elif self.template.startswith('debian-'):
|
||||||
cmd_get_kernel_version = \
|
cmd_get_kernel_version = \
|
||||||
'dpkg-query --showformat=\'${Package}\\n\' --show ' \
|
'dpkg-query --showformat=\'${Package}\\n\' --show ' \
|
||||||
'\'linux-image-*-amd64\'|sort -n|tail -1|cut -d - -f 3-'
|
'\'linux-image-*-amd64\'|sort -V|tail -1|cut -d - -f 3-'
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("Unsupported template?!")
|
raise RuntimeError("Unsupported template?!")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user