Lookup of the kernel version is done by directly reading the
kernel image via a small tool named kversion. The scope of the
tool is limited and does not work for e.g kernel images which
contains its own decompressor code. For the special cases we
defined exceptions, one was zImage. The recently added exception
for vmlinuz seemed too intrusive to me and was also not well
documented. This patch tries to clarify and get us back to
explicit and easy to read coding. Fixes#899
Due to the workaround to lookup the gzip compressed variant
of a zImage to find its version, it's required to find the
full name of the zImage in order to rematch the gzip variant.
Looking at the zImage link will make this to fail because
there is no vmlinux link
kernels build as zImage contains the decompressor code
as part of the kernel image and could be therefore
compressed by any possible compression algorithm.
In this case we assume/hope that there is also a
standard gz compressed vmlinux version of the kernel
available and check this one instead of the zImage
variant. Fixes#587
The Kernel instance is the only correct place to ask
for the kernel name. This class has the responsibility
to know information about the selected kernel. The
additional arch based assumption on the kernel name
in the disk builder were wrong. This fixes bnc#1011936
Complete the list of kernel names for the lookup. Normally
the kernel package provides a symlink to the actual kernel
image file. However if the link does not exist we extend the
search to a collection of names for possible kernel images.
The new list now also covers kernel names as used for arm
Along with the change this patch also provides an option to
raise an exception if the kernel lookup did not find any
kernel, which is used for the get_kernel() request in the
dracut initrd system setup where it is mandatory to find
a kernel image.
This fixes bnc#1010874