Re: make menuconfig & NLS broken

Michael Elizabeth Chastain (mec@shout.net)
Tue, 23 Dec 1997 00:34:10 -0600


Hello kernel hackers,

This is a real bug in Menuconfig. And I have a real patch for it:

<ftp://ftp.shout.net/pub/users/mec/patch/nls-config.2175>

The bug is: if a script uses define_bool to define a variable,
and then tests the variable, the variable is not immediately available
because define_bool does not actually define it.

The patch is so short, I'm going to append it to this message, too.
Let me know if it works for you.

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

===

diff -u -r -N linux-2.1.75/fs/nls/Config.in linux/fs/nls/Config.in
--- linux-2.1.75/fs/nls/Config.in Fri Dec 19 17:24:21 1997
+++ linux/fs/nls/Config.in Tue Dec 23 00:15:47 1997
@@ -2,9 +2,6 @@
# Native language support configuration
#

-mainmenu_option next_comment
-comment 'Native Language Support'
-
# msdos and Joliet want NLS
if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
-o "$CONFIG_NTFS_FS" != "n" ]; then
@@ -14,6 +11,8 @@
fi

if [ "$CONFIG_NLS" = "y" ]; then
+ mainmenu_option next_comment
+ comment 'Native Language Support'
tristate 'Codepage 437' CONFIG_NLS_CODEPAGE_437
tristate 'Codepage 737' CONFIG_NLS_CODEPAGE_737
tristate 'Codepage 775' CONFIG_NLS_CODEPAGE_775
@@ -40,6 +39,5 @@
tristate 'NLS ISO 8859-8' CONFIG_NLS_ISO8859_8
tristate 'NLS ISO 8859-9' CONFIG_NLS_ISO8859_9
tristate 'NLS KOI8-R' CONFIG_NLS_KOI8_R
+ endmenu
fi
-
-endmenu
diff -u -r -N linux-2.1.75/scripts/Menuconfig linux/scripts/Menuconfig
--- linux-2.1.75/scripts/Menuconfig Sun Dec 21 19:41:30 1997
+++ linux/scripts/Menuconfig Tue Dec 23 00:13:33 1997
@@ -24,10 +24,15 @@
# 070497 Bernhard Kaindl (bkaindl@netway.at) - get default values for
# new bool, tristate and dep_tristate parameters from the defconfig file.
# new configuration parameters are marked with '(NEW)' as in make config.
+#
# 180697 Bernhard Kaindl (bkaindl@netway.at) - added the needed support
# for string options. They are handled like the int and hex options.
+#
# 081297 Pavel Machek (pavel@atrey.karlin.mff.cuni.cz) - better error
# handling
+#
+# 221297 Michael Chastain (mec@shout.net) - make define_bool actually
+# define its arguments so that later tests on them work right.
#----------------------------------------------------------------------------


@@ -96,10 +101,10 @@
}

#
-# Don't need this yet, but we don't want to puke either.
+# Define a boolean to a specific value.
#
function define_bool () {
- :
+ eval $1=$2
}

#