2011-07-14 22:05:05 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-10-25 15:32:44 +02:00
|
|
|
. /sabayon/bin/kernels.inc
|
2011-07-14 22:05:05 +02:00
|
|
|
packages="app-emulation/virtualbox-guest-additions app-emulation/virtualbox-modules x11-drivers/xf86-video-virtualbox"
|
2011-10-11 11:09:26 +02:00
|
|
|
non_tagged_packages="virtualbox-bin"
|
2011-07-14 22:05:05 +02:00
|
|
|
|
|
|
|
# build for latest kernel
|
2011-08-07 22:42:20 +02:00
|
|
|
KERNEL_DIR="/usr/src/linux-${running_kernel}" emerge $packages ${non_tagged_packages}
|
2011-07-14 22:05:05 +02:00
|
|
|
echo -5 | etc-update
|
2011-11-07 16:47:39 +01:00
|
|
|
eit add ${packages} ${non_tagged_packages}
|
2011-07-14 22:05:05 +02:00
|
|
|
|
|
|
|
for kernel in $kernels; do
|
|
|
|
if [ "${kernel}" = "${running_kernel}" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
rm -rf /usr/portage/packages/*
|
|
|
|
KERNEL_DIR="/usr/src/linux-${kernel}" emerge -B ${packages} || ( echo "ouch unable to build" && exit 1 )
|
|
|
|
built_pkgs=$(find /usr/portage/packages -name "*.tbz2" | xargs echo)
|
|
|
|
[[ -z "${built_pkgs}" ]] && echo "ouch no kernel pkgs" && exit 2
|
2011-11-07 16:47:39 +01:00
|
|
|
eit inject ${built_pkgs} || ( echo "ouch unable to inject" && exit 3 )
|
2011-07-14 22:05:05 +02:00
|
|
|
echo
|
2011-11-07 16:49:58 +01:00
|
|
|
eit search "#${kernel}" -q | sort | uniq
|
2011-07-14 22:05:05 +02:00
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
2011-08-07 22:42:20 +02:00
|
|
|
echo "Now you should remove old packages"
|
2011-07-14 22:05:05 +02:00
|
|
|
echo "PLEASE also see /etc/entropy/packages/packages.server.dep_rewrite"
|