Skip to contentSkip to conversation

2.5 vi .config ; make oldconfig not working

PATCH In review Jens Axboe 12 participants 25 messages Nov 5, 2002 – Nov 7, 2002 Kconfig

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

Hi,

Can it really be that one cannot edit a config file and run make oldconfig anymore? I'm used to editing an entry in .config and running oldconfig to fix things up, now it just reenables the option. That's clearly a major regression.

Signature · 1 line
Jens Axboe
#1 lore raw
Quoted 8 lines · Jens Axboe

Hi,

Can it really be that one cannot edit a config file and run make oldconfig anymore? I'm used to editing an entry in .config and running oldconfig to fix things up, now it just reenables the option. That's clearly a major regression.

It works fine for me :)

I don't think I could survive without the tried and true "vi .config ; make oldconfig" kernel configurator :)

author
#2 lore raw
Quoted 12 lines · Jeff Garzik
Quoted 8 lines · Jens Axboe

Hi,

Can it really be that one cannot edit a config file and run make oldconfig anymore? I'm used to editing an entry in .config and running oldconfig to fix things up, now it just reenables the option. That's clearly a major regression.

Quoted 3 lines

It works fine for me :)

I don't think I could survive without the tried and true "vi .config ;

Well me neither!

Quoted 1 line

make oldconfig" kernel configurator :)

Hmmm:

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n axboe@burns:[.]linux-2.5-deadline-rbtree $ make oldconfig axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y

Signature · 1 line
Jens Axboe
#3 lore raw
Quoted 10 lines · Jens Axboe

Hmmm:

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

'=n' is wrong, that should be "# CONFIG_NFSD_V4 is not set" still...

or, just delete it. that's what I do :) the configurator will re-prompt for it, and I hit 'n'

yeah, nfsd build is still broken here too :)

author
#4 lore raw
Quoted 6 lines · Jeff Garzik
Quoted 4 lines · Jens Axboe

Hmmm:

Quoted 8 lines
Quoted 6 lines

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

'=n' is wrong, that should be "# CONFIG_NFSD_V4 is not set" still...

Why is that wrong? It worked before.

Quoted 2 lines

or, just delete it. that's what I do :) the configurator will re-prompt for it, and I hit 'n'

I don't want a prompt for y/n, I just set it to no!

Quoted 1 line

yeah, nfsd build is still broken here too :)

:-)

Signature · 1 line
Jens Axboe
#5 lore raw
Quoted 3 lines · Jens Axboe
Quoted 1 line

'=n' is wrong, that should be "# CONFIG_NFSD_V4 is not set" still...

Why is that wrong? It worked before.

I've run into kernels where '=n' didn't work. The old-skool
canonical answer was "# CONFIG_FOO is not set", and that worked reliably in <2.5

Joel

Signature · 10 lines
 print STDOUT q
 Just another Perl hacker,
 unless $spring
	- Larry Wall

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127
author
#6 lore raw
Quoted 6 lines · Joel Becker
Quoted 3 lines · Jens Axboe
Quoted 1 line

'=n' is wrong, that should be "# CONFIG_NFSD_V4 is not set" still...

Why is that wrong? It worked before.

I've run into kernels where '=n' didn't work. The old-skool

Never ever had a problem with it, and I've compiled pretty much every single kernel in the last handful of kernel cycles.

Quoted 2 lines

canonical answer was "# CONFIG_FOO is not set", and that worked reliably in <2.5

Less handy, though.

Signature · 1 line
Jens Axboe
#7 lore raw
In reply to Jens Axboe

Hi,

Quoted 10 lines · Jens Axboe
Quoted 8 lines
Quoted 6 lines

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

'=n' is wrong, that should be "# CONFIG_NFSD_V4 is not set" still...

Why is that wrong? It worked before.

It was not documented and I only implemented that was documented. :) It's of course no problem to change that.

bye, Roman

author
#8 lore raw
Quoted 11 lines · Roman Zippel

Hi,

Quoted 7 lines · Jens Axboe
Quoted 7 lines
Quoted 6 lines

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

'=n' is wrong, that should be "# CONFIG_NFSD_V4 is not set" still...

Why is that wrong? It worked before.

It was not documented and I only implemented that was documented. :) It's of course no problem to change that.

Thanks, patch from Petr is perfect :-)

Signature · 1 line
Jens Axboe
#9 lore raw
In reply to Jens Axboe
Quoted 5 lines · Jens Axboe

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

=n never worked...

# CONFIG_NFSD_V4 is not set

author
#10 lore raw
Quoted 9 lines · Arjan van de Ven
Quoted 5 lines · Jens Axboe

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

=n never worked...

You're wrong, it's always worked. I've never used anything but that.

Quoted 1 line

# CONFIG_NFSD_V4 is not set

Come on, you really expect me to type the whole damn thing? That's silly.

Signature · 1 line
Jens Axboe
author
#11 lore raw
Quoted 9 lines · Jens Axboe
Quoted 8 lines · Arjan van de Ven
Quoted 5 lines · Jens Axboe

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

Quoted 3 lines
Quoted 1 line

=n never worked...

You're wrong, it's always worked. I've never used anything but that.

2.5.44:

axboe@burns:[.]/kernel/iosched/linux-2.5 $ grep NFSD_V4 < .config 750:CONFIG_NFSD_V4=y axboe@burns:[.]/kernel/iosched/linux-2.5 $ vi .config axboe@burns:[.]/kernel/iosched/linux-2.5 $ grep NFSD_V4 < .config 750:CONFIG_NFSD_V4=n axboe@burns:[.]/kernel/iosched/linux-2.5 $ grep NFSD_V4 < .config 750:# CONFIG_NFSD_V4 is not set

Bingo, perfect.

Signature · 1 line
Jens Axboe
#12 lore raw
In reply to Jens Axboe
Quoted 6 lines · Jens Axboe

You're wrong, it's always worked. I've never used anything but that.

Quoted 1 line

# CONFIG_NFSD_V4 is not set

Come on, you really expect me to type the whole damn thing? That's silly.

So write a sed script to turn n into "is not set" or submit a change to cover it. Its luck =n ever did what you expected though.

author
#13 lore raw
Quoted 10 lines · Alan Cox
Quoted 6 lines · Jens Axboe

You're wrong, it's always worked. I've never used anything but that.

Quoted 1 line

# CONFIG_NFSD_V4 is not set

Come on, you really expect me to type the whole damn thing? That's silly.

So write a sed script to turn n into "is not set" or submit a change to cover it. Its luck =n ever did what you expected though.

5 years of luck isn't bad, I ought to start gambling.

I'll write the script, just a damn shame that this feature is gone now. .config editing is less powerful now.

Signature · 1 line
Jens Axboe
#14 lore raw
Quoted 2 lines · Jens Axboe

I'll write the script, just a damn shame that this feature is gone now. .config editing is less powerful now.

The following patch should make most garbage, such as =n, result in # CONFIG_FOO is not set
without any user confirmation.

Roman - the code uses "//" for comments. Thats not usual kernel style.

Sam

===== confdata.c 1.1 vs edited =====

confdata.c renamed from scripts/kconfig/confdata.c +17 -3
@@ -147,14 +147,28 @@
 			}
 			switch (sym->type) {
 			case S_BOOLEAN:
-				sym->def = symbol_yes.curr;
-				sym->flags &= ~SYMBOL_NEW;
+				if (p[0] == 'y') {
+					sym->def = symbol_yes.curr;
+					sym->flags &= ~SYMBOL_NEW;
+				}
+				else
+				{
+					sym->def = symbol_no.curr;
+					sym->flags &= ~SYMBOL_NEW;
+					continue;
+				}
 				break;
 			case S_TRISTATE:
 				if (p[0] == 'm')
 					sym->def = symbol_mod.curr;
-				else
+				else if (p[0] == 'y')
 					sym->def = symbol_yes.curr;
+				else
+				{
+					sym->def = symbol_no.curr;
+					sym->flags &= ~SYMBOL_NEW;
+					continue;
+				}
 				sym->flags &= ~SYMBOL_NEW;
 				break;
 			case S_STRING:
#15 lore raw

Dear diary, on Tue, Nov 05, 2002 at 08:30:04PM CET, I got a letter, where Sam Ravnborg <[email protected]> told me, that...

Quoted 6 lines · Jens Axboe
Quoted 2 lines

I'll write the script, just a damn shame that this feature is gone now. .config editing is less powerful now.

The following patch should make most garbage, such as =n, result in # CONFIG_FOO is not set
without any user confirmation.

I don't think this is actually a good idea. We break forward compatibility with this (possibly, in future we will want to add something like "yes" or you don't know what..), and then you will still get "no" for no obvious reason - asking is much saner approach here, IMHO. If we didn't understand it, assuming 'no' is not a safe way, I believe.

Signature · 7 lines
				Petr "Pasky" Baudis
.
This host is a black hole at HTTP wavelengths. GETs go in, and nothing
comes out, not even Hawking radiation.
                -- Graaagh the Mighty on rec.games.roguelike.angband
.
Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/
#16 lore raw
Quoted 9 lines · Petr Baudis
Quoted 3 lines

The following patch should make most garbage, such as =n, result in # CONFIG_FOO is not set
without any user confirmation.

I don't think this is actually a good idea. We break forward compatibility with this (possibly, in future we will want to add something like "yes" or you don't know what..), and then you will still get "no" for no obvious reason - asking is much saner approach here, IMHO. If we didn't understand it, assuming 'no' is not a safe way, I believe.

What actually happens is that any non-recognized value is assumed to be 'n'. So if 'yes' is recognised, then fine.

And with the simple parser used today "CONFIG_FOO=yes" would be recognised as yes, because it checks only the 'y'.
I did not look that close on the patch you sent, but I think they have the same functionality.

If this wasn't after feature freeze I would have liked to see the hidden .config file to be replaced by for example Kconfigdata or similar.
So many times I have seen people being asked to backup there configuration, which is located in a hidden file.
If people should keep their fingers away from it - then we should note that in the top of the file. As we do in the rest of the kernel.

And then we could have invented a better syntax, that was not dictated by bash or similar.
Something to propose in the 2.7 timeframe.

Sam

#17 lore raw
In reply to Jens Axboe
Quoted 2 lines

I'll write the script, just a damn shame that this feature is gone now. .config editing is less powerful now.

Well, the script is easy...

cat << DONE >> .vimrc
:map - :s/=y$/ is not set/ :s/^/# /
DONE

Needs even less work than before now...

--8<------------------------------------------------------------------------- main(){char*s="O_>>^PQAHBbPQAHBbPOOH^^PAAHBJPAAHBbPA_H>BB";int i,j,k=1,l,m,n; for(j=0;j<7;j++)for(l=0;m=l-6+j,i=m/6,n=j*6+i,k=1<<m%6,l<41-j;l++) putchar(l<6-j?' ':l==40-j?'\n':k&&s[n]&k?'*':' ');}

#18 lore raw

PATCH 1/1 Allow 'n' as a symbol value in the .config file.

In reply to Alan Cox

Hello,

this patch (against 2.5.46) enabled recognition of 'n' tristate/boolean
symbol value in the .config file. This allows more convenient manual editing of the .config file. Please apply.

 confdata.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

Kind regards,
Petr Baudis

scripts/kconfig/confdata.c +7 -4
@@ -1,6 +1,9 @@
 /*
  * Copyright (C) 2002 Roman Zippel <[email protected]>
  * Released under the terms of the GNU GPL v2.0.
+ *
+ * Allow 'n' as a symbol value.
+ * 2002-11-05 Petr Baudis <[email protected]>
  */
 
 #include <ctype.h>
@@ -146,13 +149,13 @@
 				break;
 			}
 			switch (sym->type) {
-			case S_BOOLEAN:
-				sym->def = symbol_yes.curr;
-				sym->flags &= ~SYMBOL_NEW;
-				break;
 			case S_TRISTATE:
 				if (p[0] == 'm')
 					sym->def = symbol_mod.curr;
+				else
+			case S_BOOLEAN:
+				if (p[0] == 'n')
+					sym->def = symbol_no.curr;
 				else
 					sym->def = symbol_yes.curr;
 				sym->flags &= ~SYMBOL_NEW;
author
#19 lore raw

Re: [PATCH] Allow 'n' as a symbol value in the .config file.

Quoted 5 lines · Petr Baudis

Hello,

this patch (against 2.5.46) enabled recognition of 'n' tristate/boolean
symbol value in the .config file. This allows more convenient manual editing of the .config file. Please apply.

Indeed, thank you very much! Confirmed to work here. Roman, can you pass on this change?

Signature · 1 line
Jens Axboe
#20 lore raw
In reply to Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 7 lines · Arjan van de Ven
Quoted 5 lines · Jens Axboe

axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=y axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config 641:CONFIG_NFSD_V4=n

Quoted 8 lines
Quoted 1 line

=n never worked...

You're wrong, it's always worked. I've never used anything but that.

Quoted 1 line

# CONFIG_NFSD_V4 is not set

Come on, you really expect me to type the whole damn thing? That's silly.

Some of the #ifdef cases simply test whether the config option is defined. (Lots of #ifdef CONFIG_DEBUG_BLAH type stuff.) Setting them to no counts as defining them, so it thinks it's a y. (I remember cml2 hit that way back...)

Obviously, CONFIG_NFSD_V4 is not one of them...

Rob

Signature · 2 lines
http://penguicon.sf.net - Terry Pratchett, Eric Raymond, Pete Abrams, Illiad, 
CmdrTaco, liquid nitrogen ice cream, and caffienated jello.  Well why not?
#21 lore raw
In reply to Jens Axboe

On Tue, 5 Nov 2002, Jens Axboe wrote:

| > make oldconfig" kernel configurator :)
|
| Hmmm:
|
| axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config
| 641:CONFIG_NFSD_V4=y
| axboe@burns:[.]linux-2.5-deadline-rbtree $ vi .config
| axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config
| 641:CONFIG_NFSD_V4=n
| axboe@burns:[.]linux-2.5-deadline-rbtree $ make oldconfig
| axboe@burns:[.]linux-2.5-deadline-rbtree $ grep CONFIG_NFSD_V4 < .config
| 641:CONFIG_NFSD_V4=y

Yes, I saw this behavior last night also (on different options).

Signature · 1 line
~Randy
#22 lore raw
In reply to Jeff Garzik
Quoted 8 lines · Jeff Garzik
Quoted 5 lines

Can it really be that one cannot edit a config file and run make oldconfig anymore? I'm used to editing an entry in .config and running oldconfig to fix things up, now it just reenables the option. That's clearly a major regression.

It works fine for me :)
I don't think I could survive without the tried and true "vi .config ; make oldconfig" kernel configurator :)

Here it seems to work fine if I delete a line completely, but if I change
CONFIG_FOO=y
to
#CONFIG_FOO=y

it regenerates .config without the #
This used to work fine. I guess the new parser
is a little more strict..

Dave

Signature · 1 line
| Dave Jones.        http://www.codemonkey.org.uk
author
#23 lore raw
Quoted 11 lines · Dave Jones
Quoted 8 lines · Jeff Garzik
Quoted 5 lines

Can it really be that one cannot edit a config file and run make oldconfig anymore? I'm used to editing an entry in .config and running oldconfig to fix things up, now it just reenables the option. That's clearly a major regression.

It works fine for me :)
I don't think I could survive without the tried and true "vi .config ; make oldconfig" kernel configurator :)

Quoted 5 lines

Here it seems to work fine if I delete a line completely, but if I change
CONFIG_FOO=y
to
#CONFIG_FOO=y

Yeah that works. It will ask me about CONFIG_FOO when I run make oldconfig, though.

I still think it's a regression, and a very annoying one too.

Signature · 1 line
Jens Axboe
#24 lore raw
In reply to Dave Jones
Quoted 16 lines · Dave Jones
Quoted 7 lines · Jeff Garzik
Quoted 5 lines

Can it really be that one cannot edit a config file and run make oldconfig anymore? I'm used to editing an entry in .config and running oldconfig to fix things up, now it just reenables the option. That's clearly a major regression.

It works fine for me :)
I don't think I could survive without the tried and true "vi .config ; make oldconfig" kernel configurator :)

Here it seems to work fine if I delete a line completely, but if I change
CONFIG_FOO=y
to
#CONFIG_FOO=y

Quoted 5 lines

it regenerates .config without the #
This used to work fine. I guess the new parser
is a little more strict..

well, consider too that '# blah blah' was never really a completely-free-to-use namespace, it was considered special due to the shell-based parsing that needed to occur. '# CONFIG_FOO is not set' is the classic example of using the '#' space...

Jeff