linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make gconfig: fix the "(NEW)" string
@ 2009-12-04 18:38 matteo_cortese
  2009-12-04 19:02 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: matteo_cortese @ 2009-12-04 18:38 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel

The string "(NEW)" is added to those options that are not present in the
 current config file, thus looking as new features. Alas, the logic seem
s to be inverted.
 

Signed-off-by: Matteo Cortese <matteo_cortese@fastwebnet.it>
------

diff -u linux-source-2.6.26-old/scripts/kconfig/gconf.c linux-source-2.6
.26/scripts/kconfig/gconf.c
--- linux-source-2.6.26-old/scripts/kconfig/gconf.c	2008-07-13 21:51:29.
000000000 +0000
+++ linux-source-2.6.26/scripts/kconfig/gconf.c	2009-01-03 00:52:57.0000
00000 +0000
@@ -1174,7 +1174,7 @@
 
 	row[COL_OPTION] =
 	    g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
-			    sym && sym_has_value(sym) ? "(NEW)" : "");
+			    sym && !sym_has_value(sym) ? "(NEW)" : "");
 
 	if (show_all && !menu_is_visible(menu))
 		row[COL_COLOR] = g_strdup("DarkGray");


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] make gconfig: fix the "(NEW)" string
  2009-12-04 18:38 [PATCH] make gconfig: fix the "(NEW)" string matteo_cortese
@ 2009-12-04 19:02 ` Randy Dunlap
  2009-12-09  1:40   ` Matteo Cortese
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2009-12-04 19:02 UTC (permalink / raw)
  To: matteo_cortese; +Cc: linux-kbuild, linux-kernel

On Fri, 4 Dec 2009 19:38:24 +0100 (CET) matteo_cortese@fastwebnet.it wrote:

> The string "(NEW)" is added to those options that are not present in the
>  current config file, thus looking as new features. Alas, the logic seem
> s to be inverted.

Did you just notice that thru source code inspection or via testing of
gconfig?


> Signed-off-by: Matteo Cortese <matteo_cortese@fastwebnet.it>
> ------
> 
> diff -u linux-source-2.6.26-old/scripts/kconfig/gconf.c linux-source-2.6
> .26/scripts/kconfig/gconf.c
> --- linux-source-2.6.26-old/scripts/kconfig/gconf.c	2008-07-13 21:51:29.
> 000000000 +0000
> +++ linux-source-2.6.26/scripts/kconfig/gconf.c	2009-01-03 00:52:57.0000
> 00000 +0000
> @@ -1174,7 +1174,7 @@
>  
>  	row[COL_OPTION] =
>  	    g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
> -			    sym && sym_has_value(sym) ? "(NEW)" : "");
> +			    sym && !sym_has_value(sym) ? "(NEW)" : "");
>  
>  	if (show_all && !menu_is_visible(menu))
>  		row[COL_COLOR] = g_strdup("DarkGray");
> 
> --

Well, for me, with just some random config file that has
CONFIG_MODULES=y
CONFIG_BLOCK=y

gconfig with this patch says:

  Enable loadable module support
  Enable the block layer (NEW)

and gconfig without this patch says:

  Enable loadable module support (NEW)
  Enable the block layer


I'm confuzed.  Go figure.

---
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] make gconfig: fix the "(NEW)" string
  2009-12-04 19:02 ` Randy Dunlap
@ 2009-12-09  1:40   ` Matteo Cortese
  0 siblings, 0 replies; 3+ messages in thread
From: Matteo Cortese @ 2009-12-09  1:40 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kbuild, linux-kernel

On 04/12/2009 11:02 -0800, Randy Dunlap wrote:

> Did you just notice that thru source code inspection or via testing of
> gconfig?

I noticed the problem with the following test case (with the patch NOT
applied). 

$ rm -f .config
$ make clean && make gconfig

Select File->Save to save a "clean" version of .config and exit.
Now let's target a specific option, e.g. CONFIG_MODULES, and check that
it is present, either set to 'y' or commented out (mine is set to 'y'):

$ grep 'CONFIG_MODULES' .config
CONFIG_MODULES=y
$ make gconfig

At this point I see that module support has the NEW flag, but it
shouldn't! Exit, then manually remove CONFIG_MODULES from the .config
file:

$ sed -i '/CONFIG_MODULES/d' .config
$ make clean && make gconfig

Now I see that module support is not flagged as NEW, but it should.

I concluded that the logic was inverted.
I looked up the string NEW in the source and found the piece of code
cited below. Then I tried and figured out what that code was supposed to
do, and thought that it made more sense that the NEW flag was added when
an option (sym) had not been assigned a value yet (!sym_has_value).
So I worked out this simple patch. I've been using it for some time, and
it works for me, I mean, if I try the above test case, it gives the
expected results.


> Well, for me, with just some random config file that has
> CONFIG_MODULES=y
> CONFIG_BLOCK=y
> 
> gconfig with this patch says:
> 
>   Enable loadable module support
>   Enable the block layer (NEW)
> 
> and gconfig without this patch says:
> 
>   Enable loadable module support (NEW)
>   Enable the block layer
> 
> 
> I'm confuzed.  Go figure.

Yes, it makes no sense. Unfortunately I have no experience with .config
files generated in any other way than written by the GTK configurator...

Please bear in mind that I'm not a kernel developer, I just recompile my
kernel when a new version is released. I usually copy my .config file
from the previous kernel directory and then use the "NEW" flag to tell
which options were added since my last compile and thus deserve my
attention.
---
Matteo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-09  1:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-04 18:38 [PATCH] make gconfig: fix the "(NEW)" string matteo_cortese
2009-12-04 19:02 ` Randy Dunlap
2009-12-09  1:40   ` Matteo Cortese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).