Re: bug in 2.3.18ac9 net/Config.in

Michael Elizabeth Chastain (mec@shout.net)
Tue, 28 Sep 1999 06:12:32 -0500


Hi Jes,

> Now the questions is really why nobody fixes menuconfig instead. It
> seems that for every little irrelevant change either menuconfig or
> xconfig breaks for whatever stupid thing. If the situation is not
> improved we really should remove them from the kernel tree, they seem
> to cause more grief than good.

I've got insomnia so you get a long answer.

First, on a literal level, leaving out a "then" keyword is not a "little
irrelevant change". Documentation/kbuild/config-language.txt is the
specification for Config Language. Based on legacy "bash" syntax,
the Config Language syntax specifies that an "if" statement must have a
"then" keyword.

So I think the real question is "how come Menuconfig doesn't print out
informative syntax errors?" Because if it did, then the people who write
Config.in scripts with syntax errors would get error reports before
submitting their patches to Alan or Linus.

The problem goes back a long, long ways to the use of ad hoc scripts
for kernel configuration.

First there was some old 'Configure' shell script, which I've never seen.
Then sometime in 1993, or even earlier, Raymond Chen of Microsoft wrote
the current 'Configure' script.

Next, Eric Youngdale wrote a very kludgy Config.in->tk translator,
which works OK most of the time. So you have a choice: you can run
the reliable but awkward text-mode script written by a Microsoft
engineer, or you can run the flashy, crashy windowing version from
somebody else. (Ironic, isn't it?)

After that, William Roadcap (not from Microsoft) wrote Menuconfig,
which is a super kludge of a language interpreter, but wow does it have a
nice curses interfaces. Mr. Roadcap disappeared, I took responsibility,
I fixed a lot of bugs in Menuconfig, and then I semi-disappeared too.

These ad hoc script interpreters simply do not scale up to the size of
the development community. Some poor guy trying to add something to the
network drivers omits a required keyword and instead of a nice syntax
error, dozens of people get a mysterious message. As you noticed,
this happens several times a year.

Here is the second Microsoft-ish irony:

<flame-bait>
Linux developers have high standards for the work they produce, but when
it comes to the tools they use to do their *own* work, they value features
and familiarity and speed more than correctness.
</flame-bait>

Don't believe me? Read scripts/Menuconfig, figure out what the hell
it's doing (including the magic awk script in the middle), and then ask
yourself if Linus would knowingly accept a driver or a filesystem that
behaves so randomly in the presence of errors. But the kbuild procedure
is full of this kind of shit: CONFIG_MODVERSIONS, "make modules_install",
three different configuration parsers, configuration parameters tucked
into the Makefiles.

I believe the right fix is a real grammar, written in bison, with real
syntax checking and real error messages. I have one in progress with
a generic back-end and a curses front-end. I've actually configured and
built kernels with it. Jim Bray is working on a gtk front-end for it.

The code's been available for eight months now and I've gotten some
interest in it. Menuconfig is not well-loved among its captive
audience (more Microsoft parallels).

My new mconfig runs in about 5% of the CPU time of Menuconfig.
(I developed it on a 486, a *slow* 486, so I made it fast, *very* fast).
But forget about the speed. The nicest part of mconfig is that when I
ran it on 2.3.18ac9 tonight, it said:

net/Config.in: 70: parse error

What I really need now is a block of hacking time, about 2-4 weeks long,
to bring it to a usable level. I expect to use my winter vacation to
do this.

Then I am going to try to put Menuconfig out of business. Also
Configure and Xconfig, too. Not by taking them away from people -- but
by offering something that they prefer to run so that the old ones
die from lack of users.

Work in progress:

ftp://ftp.shout.net/pub/users/mec/experimental/mconfig-0.15.tar.gz

I actually *don't* want much feedback on this yet. I'm just putting it
up so people can see the direction I'm going.

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/