summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/linux/linux-4.14.27-r1.ebuild (renamed from sys-kernel/linux/linux-4.14.26-r1.ebuild)18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys-kernel/linux/linux-4.14.26-r1.ebuild b/sys-kernel/linux/linux-4.14.27-r1.ebuild
index 3110217..7e6dd73 100644
--- a/sys-kernel/linux/linux-4.14.26-r1.ebuild
+++ b/sys-kernel/linux/linux-4.14.27-r1.ebuild
@@ -18,7 +18,8 @@ IUSE="virt +initramfs"
DEPEND="
sys-devel/bc
- dev-libs/elfutils"
+ dev-libs/elfutils
+ initramfs? ( dracut )"
src_configure() {
# Fix ARCH variable
@@ -65,11 +66,19 @@ sysfile() {
}
pkg_postinst() {
- sysfile
+ # Generate initramfs
+ if $(use initramfs); then
+ einfo "Generating initramfs"
+ dracut \
+ -m "dash i18n rootfs-block terminfo udev-rules base fs-lib img-lib dm btrfs crypt" \
+ --force "/boot/initramfs-${PV}" "${PV}"
+ fi
+
# Add label to syslinux config if there is non yet
+ sysfile
if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then
if $(use initramfs); then
- INITRD="\tINITRD ${PFIX}/initramfs-gentoo\n"
+ INITRD="\tINITRD ${PFIX}/initramfs-${PV}\n"
fi
ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')"
if [ -n "$ARGS" ]; then
@@ -79,12 +88,13 @@ pkg_postinst() {
eerror "Adding label to syslinux configuration failed as there are no arguments"
fi
fi
+
src_link
}
pkg_prerm() {
- sysfile
# Remove label from syslinux config
+ sysfile
sed -i "/^LABEL gentoo-${PV}\(\|-recovery\)$/,/^$/d" "${SYSLINUX}" || eerror "Removing label from syslinux fonfiguration failed!"
}