commit:     96f9bf6c921591e8ada22945029b50637e974567
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 26 03:40:05 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Mar 26 07:12:06 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=96f9bf6c

config_kernel(): rewrite CONFIG_MODULE handling

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_configkernel.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index a8627b4..27704cf 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -149,21 +149,26 @@ config_kernel() {
 
        # Do we support modules at all?
        cfg_CONFIG_MODULES=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" 
"CONFIG_MODULES")
-       if isTrue "$cfg_CONFIG_MODULES" ; then
+       if isTrue "${cfg_CONFIG_MODULES}"
+       then
                # yes, we support modules, set 'm' for new stuff.
                newcfg_setting='m'
                # Compare the kernel module compression vs the depmod module 
compression support
                # WARNING: if the buildhost has +XZ but the target machine has 
-XZ, you will get failures!
                cfg_CONFIG_MODULE_COMPRESS_GZIP=$(kconfig_get_opt 
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_MODULE_COMPRESS_GZIP")
                cfg_CONFIG_MODULE_COMPRESS_XZ=$(kconfig_get_opt 
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_MODULE_COMPRESS_XZ")
-               if isTrue "${cfg_CONFIG_MODULE_COMPRESS_GZIP}"; then
+               if isTrue "${cfg_CONFIG_MODULE_COMPRESS_GZIP}"
+               then
                        depmod_GZIP=$(/sbin/depmod -V | tr ' ' '\n' | awk 
'/ZLIB/{print $1; exit}')
-                       if [[ "${depmod_GZIP}" != "+ZLIB" ]]; then
+                       if [[ "${depmod_GZIP}" != "+ZLIB" ]]
+                       then
                                gen_die 'depmod does not support ZLIB/GZIP, 
cannot build with CONFIG_MODULE_COMPRESS_GZIP'
                        fi
-               elif isTrue "${cfg_CONFIG_MODULE_COMPRESS_XZ}" ; then
+               elif isTrue "${cfg_CONFIG_MODULE_COMPRESS_XZ}"
+               then
                        depmod_XZ=$(/sbin/depmod -V | tr ' ' '\n' | awk 
'/XZ/{print $1; exit}')
-                       if [[ "${depmod_XZ}" != "+XZ" ]]; then
+                       if [[ "${depmod_XZ}" != "+XZ" ]]
+                       then
                                gen_die 'depmod does not support XZ, cannot 
build with CONFIG_MODULE_COMPRESS_XZ'
                        fi
                fi

Reply via email to