summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-08-18 01:25:11 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-08-18 01:25:55 +0200
commitc024aafd9e3d27ec79bcc96dc17f2a152c2bc333 (patch)
treeaab181af0678561816aff9d6e7788ab8b0117c10
parentapp-crypt/rhash: Drop old 1.3.8 and 1.3.9-r2 (diff)
downloadgentoo-c024aafd9e3d27ec79bcc96dc17f2a152c2bc333.tar.gz
gentoo-c024aafd9e3d27ec79bcc96dc17f2a152c2bc333.tar.bz2
gentoo-c024aafd9e3d27ec79bcc96dc17f2a152c2bc333.zip
sys-kernel/genkernel: fix --integrated-initramfs option
Closes: https://bugs.gentoo.org/737598 Package-Manager: Portage-3.0.2, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--sys-kernel/genkernel/files/genkernel-4.1.0-fix-integrated-initramfs.patch28
-rw-r--r--sys-kernel/genkernel/genkernel-4.1.0-r1.ebuild (renamed from sys-kernel/genkernel/genkernel-4.1.0.ebuild)2
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-kernel/genkernel/files/genkernel-4.1.0-fix-integrated-initramfs.patch b/sys-kernel/genkernel/files/genkernel-4.1.0-fix-integrated-initramfs.patch
new file mode 100644
index 00000000000..afe3e99dbc5
--- /dev/null
+++ b/sys-kernel/genkernel/files/genkernel-4.1.0-fix-integrated-initramfs.patch
@@ -0,0 +1,28 @@
+--- a/gen_determineargs.sh
++++ b/gen_determineargs.sh
+@@ -1170,6 +1170,14 @@ determine_real_args() {
+ fi
+ fi
+
++ if isTrue "${INTEGRATED_INITRAMFS}"
++ then
++ if ! isTrue "${BUILD_KERNEL}" || ! isTrue "${BUILD_RAMDISK}"
++ then
++ gen_die "Invalid action specified: --integrated-initramfs option requires action \"all\", i.e. building of kernel and initramfs at the same time!"
++ fi
++ fi
++
+ if ! isTrue "${CMD_INSTALL}"
+ then
+ if [ -n "${KERNEL_MODULES_PREFIX}" ]
+--- a/gen_funcs.sh
++++ b/gen_funcs.sh
+@@ -2033,7 +2033,7 @@ kconfig_set_opt() {
+ else
+ print_info 3 "$(get_indent ${indentlevel}) - Setting option '${optname}' to '${optval}' in '${kconfig}'..."
+ sed -i "${kconfig}" \
+- -e "s/^#\? \?${optname}[ =].*/${optname}=${optval}/g" \
++ -e "s|^#\? \?${optname}[ =].*|${optname}=${optval}|g" \
+ || gen_die "Failed to set '${optname}=${optval}' in '${kconfig}'"
+
+ [ ! -f "${KCONFIG_MODIFIED_MARKER}" ] && touch "${KCONFIG_MODIFIED_MARKER}"
diff --git a/sys-kernel/genkernel/genkernel-4.1.0.ebuild b/sys-kernel/genkernel/genkernel-4.1.0-r1.ebuild
index f4f851fba1a..0b57d466b50 100644
--- a/sys-kernel/genkernel/genkernel-4.1.0.ebuild
+++ b/sys-kernel/genkernel/genkernel-4.1.0-r1.ebuild
@@ -118,6 +118,8 @@ if [[ ${PV} == 9999* ]]; then
DEPEND="${DEPEND} app-text/asciidoc"
fi
+PATCHES=( "${FILESDIR}"/${P}-fix-integrated-initramfs.patch )
+
src_unpack() {
if [[ ${PV} == 9999* ]]; then
git-r3_src_unpack