Install all available kernels by default (#581)

Anaconda/pungi doesn't support multiple versions of the same package at
the time, so place all kernels on installation media in separate
directory and install them in %post script.
This commit is contained in:
Marek Marczykowski-Górecki 2013-08-27 01:00:28 +02:00
parent 05c26844ca
commit 76f22a0ea0
4 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,8 @@
%post --nochroot
for pkg in /run/install/repo/extrakernels/*.rpm; do
name=`basename $pkg .rpm`
rpm --root=$ANA_INSTALL_PATH -q $name > /dev/null || rpm --root=$ANA_INSTALL_PATH -i --oldpackage $pkg
done
%end

View File

@ -18,5 +18,5 @@
# Author: Chris Lumens <clumens@redhat.com>
postscriptsdir = $(datadir)/$(PACKAGE_NAME)/post-scripts
dist_postscripts_DATA = 50-qubes.ks 80-setfilecons.ks 90-copy-screenshots.ks 99-copy-logs.ks
dist_postscripts_DATA = 40-qubes-alt-kernels.ks 50-qubes.ks 80-setfilecons.ks 90-copy-screenshots.ks 99-copy-logs.ks
MAINTAINERCLEAFILES = Makefile.in

View File

@ -78,6 +78,7 @@ label vesa
endtext
kernel mboot.c32
append xen.gz --- vmlinuz @ROOT@ xdriver=vesa nomodeset quiet --- initrd.img
@EXTRAKERNELS@
label rescue
menu indent count 5
menu label ^Rescue a @PRODUCT@ system
@ -100,7 +101,6 @@ label local
menu label Boot from ^local drive
localboot 0xffff
menu separator # insert an empty line
menu separator # insert an empty line
label returntomain
menu label Return to ^main menu
menu exit

View File

@ -6,6 +6,7 @@ PXEBOOTDIR="images/pxeboot"
BOOTDIR="isolinux"
KERNELDIR=PXEBOOTDIR
LIVEDIR="LiveOS"
EXTRAKERNELS="extrakernels"
%>
mkdir ${LIVEDIR}
@ -24,6 +25,10 @@ install ${configdir}/grub.conf ${BOOTDIR}
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
install boot/memtest* ${BOOTDIR}/memtest
mkdir ${EXTRAKERNELS}
# bypass "chroot" enforced by Lorax parser
install ../../../../yum/qubes-dom0/rpm/kernel-[0-9]*rpm ${EXTRAKERNELS}
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels: