lorax: use newest kernel for installer

Sort the kernels before creating installing them. The last one will be
the newest and will override older ones.
This commit is contained in:
Marek Marczykowski-Górecki 2013-11-18 11:30:45 +01:00
parent 645160e5e2
commit 4d072363a8

View File

@ -8,6 +8,9 @@ KERNELDIR=PXEBOOTDIR
LIVEDIR="LiveOS"
EXTRAKERNELS="extrakernels"
%>
<%!
from distutils.version import LooseVersion
%>
mkdir ${LIVEDIR}
install ${runtime_img} ${LIVEDIR}/squashfs.img
@ -31,7 +34,11 @@ install ../../../../yum/qubes-dom0/rpm/kernel-[0-9]*rpm ${EXTRAKERNELS}
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
<%
sortedkernels = sorted(kernels, key=lambda k: LooseVersion(k['version']))
%>
%for kernel in sortedkernels:
# Use short kernel version because of ISO9660 filename length limitation
<%
shortkver = kernel.version.replace('.pvops.qubes','')