From: Greg Banks <gnb@alphalink.com.au>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Michael Elizabeth Chastain <mec@shout.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Patch for xconfig
Date: Thu, 01 Aug 2002 00:59:52 +1000 [thread overview]
Message-ID: <3D47FB68.94B9D871@alphalink.com.au> (raw)
In-Reply-To: 20020729191554.A17617@devserv.devel.redhat.com
G'day,
sorry about the delay, I had to deal with a major drama in the day job.
Pete Zaitcev wrote:
>
> > Date: Sun, 28 Jul 2002 22:40:03 +1000
> > From: Greg Banks <gnb@alphalink.com.au>
>
> BTW, what I sent was a low hanged fruit that I picked.
> The main bug is worse, and I have no idea how to fix it.
> This is what we have in configuration:
>
> tristate 'ISO ...' CONFIG_ISO9660_FS
> dep_bool ' Tranparent ...' CONFIG_ZISOFS $CONFIG_ISO9660_FS
> if [ "$CONFIG_ZISOFS" = "y" ]; then
> define_tristate CONFIG_ZISOFS_FS $CONFIG_ISO9660_FS
> else
> define_tristate CONFIG_ZISOFS_FS n
> fi
>
> [...]it seems that tkparse
> chokes on the very innocently looking first part.
Actually, it's not innocent at all, the documentation does not allow
the construction "define_tristate CONFIG_FOO $CONFIG_BAR". The last
argument has to be a tristate literal, one of "y" "m" or "n". It might
look ok but that's because you're thinking shell not config language.
Remember, config language is *not* shell.
The relevant section from Documentation/kbuild/config-language.txt is:
> === define_tristate /symbol/ /word/
>
> This verb assigns the value of /word/ to /symbol/. Legal input values
> are "n", "m", and "y".
If you're trying to do what I think you're trying to do, the correct
construct is this:
dep_mbool ' Tranparent ...' CONFIG_ZISOFS $CONFIG_ISO9660_FS
if [ "$CONFIG_ZISOFS" = "y" ]; then
if [ "$CONFIG_ISO9660_FS" = "y" ]; then
define_tristate CONFIG_ZISOFS_FS y
else
define_tristate CONFIG_ZISOFS_FS m
fi
else
define_tristate CONFIG_ZISOFS_FS n
fi
If it's any consolation, you're not the only one to get it wrong.
arch/m68k/config.in:498: define_tristate CONFIG_SERIAL $CONFIG_DN_SERIAL
drivers/isdn/capi/Config.in:11: define_tristate CONFIG_ISDN_CAPI_CAPIFS $CONFIG_ISDN_CAPI_CAPI20
drivers/parport/Config.in:18: define_tristate CONFIG_PARPORT_PC_CML1 $CONFIG_PARPORT_PC
fs/Config.in:133: define_tristate CONFIG_EXPORTFS $CONFIG_NFSD
fs/Config.in:158: define_tristate CONFIG_ZISOFS_FS $CONFIG_ISO9660_FS
net/ipv4/netfilter/Config.in:58: define_tristate CONFIG_IP_NF_NAT_IRC $CONFIG_IP_NF_NAT
net/ipv4/netfilter/Config.in:67: define_tristate CONFIG_IP_NF_NAT_FTP $CONFIG_IP_NF_NAT
> The code in the menu part of kconfig.tk fixes the problem.
> In other words, the bug is only visible if someone does "make xconfig",
> loads a canned configuration which we ship, then does "save
> and exit" immediately. If he visits any menus, everything is ok.
Ah. I had reproduced your other problem differently, with this:
mainmenu_option next_comment
comment 'xconfig needs this menu'
tristate 'Set this symbol to ON' CONFIG_FOO
dep_tristate 'this is a dep_tristate' CONFIG_BAR $CONFIG_FOO m
endmenu
Open the menu, set FOO=m, save, kaboom. Your patch fixes that.
--
the price of civilisation today is a courageous willingness to prevail,
with force, if necessary, against whatever vicious and uncomprehending
enemies try to strike it down. - Roger Sandall, The Age, 28Sep2001.
next prev parent reply other threads:[~2002-07-31 14:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-28 12:40 Patch for xconfig Greg Banks
2002-07-29 23:15 ` Pete Zaitcev
2002-07-31 14:59 ` Greg Banks [this message]
[not found] <200207301001.g6UA1hN14567@sunrise.pg.gda.pl>
2002-07-30 12:57 ` Andrzej Krzysztofowicz
-- strict thread matches above, loose matches on Subject: below --
2002-07-27 2:43 Pete Zaitcev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D47FB68.94B9D871@alphalink.com.au \
--to=gnb@alphalink.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mec@shout.net \
--cc=zaitcev@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox