aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-01-10 18:10:08 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-01-11 20:54:40 +0100
commitda5a5fa797a5fffa6c4d694cbfe2edc83bab4890 (patch)
treeaf1d957fe64ad52eab51ec50f1d65d5ed21477d8 /gen_determineargs.sh
parentRework ZFS unlock (diff)
downloadgenkernel-da5a5fa797a5fffa6c4d694cbfe2edc83bab4890.tar.gz
genkernel-da5a5fa797a5fffa6c4d694cbfe2edc83bab4890.tar.bz2
genkernel-da5a5fa797a5fffa6c4d694cbfe2edc83bab4890.zip
--module-rebuild: Call emerge with --ignore-default-opts
It's possible that user has set conflicting emerge options like "--ask" in EMERGE_DEFAULT_OPTS which could break genkernel. Calling emerge with --ignore-default-opts will allow us to avoid such scenarios. In addition, --module-rebuild-cmd (MODULEREBUILD_CMD) option was added to allow user to alter default command. Closes: https://bugs.gentoo.org/705082 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_determineargs.sh')
-rwxr-xr-xgen_determineargs.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 616f4fe..61521d6 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -317,6 +317,7 @@ determine_real_args() {
set_config_with_override STRING MINKERNPACKAGE CMD_MINKERNPACKAGE
set_config_with_override STRING MODULESPACKAGE CMD_MODULESPACKAGE
set_config_with_override BOOL MODULEREBUILD CMD_MODULEREBUILD "yes"
+ set_config_with_override STRING MODULEREBUILD_CMD CMD_MODULEREBUILD_CMD "${DEFAULT_MODULEREBUILD_CMD}"
set_config_with_override STRING KERNCACHE CMD_KERNCACHE
set_config_with_override BOOL RAMDISKMODULES CMD_RAMDISKMODULES "yes"
set_config_with_override BOOL ALLRAMDISKMODULES CMD_ALLRAMDISKMODULES "no"
@@ -781,6 +782,17 @@ determine_real_args() {
# Kernel Makefile doesn't support spaces in outputdir path...
gen_die "--kernel-outputdir '${KERNEL_OUTPUTDIR}' contains space character(s) which are not supported!"
fi
+
+ if isTrue "${CMD_MODULEREBUILD}"
+ then
+ if [ -z "${MODULEREBUILD_CMD}" ]
+ then
+ gen_die "--module-rebuild-cmd cannot be empty when --module-rebuild is set!"
+ elif [[ "${MODULEREBUILD_CMD}" == *[\$\&\|\>\(\)]* ]]
+ then
+ gen_die "--module-rebuild-cmd '${MODULEREBUILD_CMD}' contains at least one of the following disallowed characters: '\$&|>()'!"
+ fi
+ fi
fi
if isTrue "${BUILD_RAMDISK}"