From f0481bc0867e2815351843d1477661067b97cea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 13 Jan 2019 17:15:42 +0100 Subject: sys-kernel/linux: Drop relative paths We can use absolute path from boot partition instead. This simplifies code and introduces less variation between machines. --- sys-kernel/linux/linux-4.19.13-r1.ebuild | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys-kernel') diff --git a/sys-kernel/linux/linux-4.19.13-r1.ebuild b/sys-kernel/linux/linux-4.19.13-r1.ebuild index 3f27472..1c1c58c 100644 --- a/sys-kernel/linux/linux-4.19.13-r1.ebuild +++ b/sys-kernel/linux/linux-4.19.13-r1.ebuild @@ -53,13 +53,10 @@ src_link() { sysfile() { if [ -f "${ROOT}/boot/syslinux/syslinux.cfg" ]; then SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" - PFIX=".." elif [ -f "${ROOT}/boot/EFI/BOOT/syslinux.cfg" ]; then SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" - PFIX="../../.." elif [ -f "${ROOT}/boot/extlinux.conf" ]; then SYSLINUX="${ROOT}/boot/extlinux.conf" - PFIX="." else eerror "Can't locate syslinux configuration!" fi @@ -71,15 +68,15 @@ pkg_postinst() { if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then if $(use initramfs); then if $(use ucode); then - INITRD="\tINITRD ${PFIX}/ucode.cpio,${PFIX}/initramfs-gentoo\n" + INITRD="\tINITRD /ucode.cpio,/initramfs-gentoo\n" else - INITRD="\tINITRD ${PFIX}/initramfs-gentoo\n" + INITRD="\tINITRD /initramfs-gentoo\n" fi fi ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" if [ -n "$ARGS" ]; then - sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n$INITRD" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" - sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n$INITRD" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX /bzlinux-${PV}\n\tAPPEND ${ARGS}\n$INITRD" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" + sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX /bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n$INITRD" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" else eerror "Adding label to syslinux configuration failed as there are no arguments" fi -- cgit v1.2.3