All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] kconfig: fix savedefconfig with choice marked optional
@ 2010-08-14 23:26 Sedat Dilek
  2010-08-15  1:15 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Sedat Dilek @ 2010-08-14 23:26 UTC (permalink / raw)
  To: Michal Marek, Sam Ravnborg, LKML, linux-kbuild

Recent kbuild/kconfig patches seem not to be in
<http://repo.or.cz/w/linux-kbuild.git>?

Looks like there is a new home:

-T:      git git://repo.or.cz/linux-kbuild.git for-next
-T:      git git://repo.or.cz/linux-kbuild.git for-linus
+T:      git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
for-next
+T:      git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
for-linus

Also, I would appreciate to have the Vcs-Browser URL (to say it in
"Debian language") in the MAINTAINERS file.
Personally, I check the GIT repos/branches via web-browser.

T:      http://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
T:      https://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git

What do you think of that?

- Sedat -

$ grep kbuild MAINTAINERS
L:      linux-kbuild@vger.kernel.org
Q:      http://patchwork.kernel.org/project/linux-kbuild/list/
F:      Documentation/kbuild/kconfig-language.txt
T:      git git://repo.or.cz/linux-kbuild.git for-next
T:      git git://repo.or.cz/linux-kbuild.git for-linus
L:      linux-kbuild@vger.kernel.org
F:      Documentation/kbuild/

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

* Re: [PATCH] kconfig: fix savedefconfig with choice marked optional
  2010-08-14 23:26 [PATCH] kconfig: fix savedefconfig with choice marked optional Sedat Dilek
@ 2010-08-15  1:15 ` Sam Ravnborg
  2010-08-15  7:07   ` Sedat Dilek
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2010-08-15  1:15 UTC (permalink / raw)
  To: sedat.dilek; +Cc: Michal Marek, LKML, linux-kbuild

On Sun, Aug 15, 2010 at 01:26:22AM +0200, Sedat Dilek wrote:
> Recent kbuild/kconfig patches seem not to be in
> <http://repo.or.cz/w/linux-kbuild.git>?
> 
> Looks like there is a new home:
> 
> -T:      git git://repo.or.cz/linux-kbuild.git for-next
> -T:      git git://repo.or.cz/linux-kbuild.git for-linus
> +T:      git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
> for-next
> +T:      git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
> for-linus

This is already fixed in upstream. You need to update
your source repository.

See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3631d9a2e503ec9c36b0599b2e45548e5c410516

	Sam

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

* Re: [PATCH] kconfig: fix savedefconfig with choice marked optional
  2010-08-15  1:15 ` Sam Ravnborg
@ 2010-08-15  7:07   ` Sedat Dilek
  0 siblings, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2010-08-15  7:07 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Michal Marek, LKML, linux-kbuild

On Sun, Aug 15, 2010 at 3:15 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Sun, Aug 15, 2010 at 01:26:22AM +0200, Sedat Dilek wrote:
>> Recent kbuild/kconfig patches seem not to be in
>> <http://repo.or.cz/w/linux-kbuild.git>?
>>
>> Looks like there is a new home:
>>
>> -T:      git git://repo.or.cz/linux-kbuild.git for-next
>> -T:      git git://repo.or.cz/linux-kbuild.git for-linus
>> +T:      git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
>> for-next
>> +T:      git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
>> for-linus
>
> This is already fixed in upstream. You need to update
> your source repository.
>
> See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3631d9a2e503ec9c36b0599b2e45548e5c410516
>

I am sorry, did not look into the patched src-dir:

$ grep kbuild debian/build/source_i386_none/MAINTAINERS | grep ^T
T:      git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
for-next
T:      git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
rc-fixes

Thanks!

- Sedat -

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

* Re: [PATCH] kconfig: fix savedefconfig with choice marked optional
  2010-08-14 21:29 ` Sam Ravnborg
  (?)
@ 2010-08-14 22:41 ` Michal Marek
  -1 siblings, 0 replies; 6+ messages in thread
From: Michal Marek @ 2010-08-14 22:41 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild, lkml

Dne 14.8.2010 23:29, Sam Ravnborg napsal(a):
> From db5b47421d4e9c2f3a35bc3aaa4a1423b767e00a Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sat, 14 Aug 2010 23:22:16 +0200
> Subject: [PATCH] kconfig: fix savedefconfig with choice marked optional
> 
> savedefconfig failed to save the correct minimal config
> when it encountered a choice marked optional.
> 
> Consider following minimal configuration:
> $cat Kconfig
> choice
> 	prompt "choice"
> 	optional
> 
> config A
> 	bool "a"
> 
> config B
> 	bool "b"
> 
> endchoice
> 
> $cat .config | grep -v ^#
> CONFIG_A=y
> 
> $conf --savedefconfig=defconfig Kconfig
> 
> would before this fix result in an empty file, because
> kconfig would assume that CONFIG_A=y is a default value.
> But because the choice is optional the default is that
> both A and B are =n.
> 
> Fix so we handle optional choices correct.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  scripts/kconfig/confdata.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

Applied to kbuild/kconfg.

Michal

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

* [PATCH] kconfig: fix savedefconfig with choice marked optional
@ 2010-08-14 21:29 ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2010-08-14 21:29 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, lkml

>From db5b47421d4e9c2f3a35bc3aaa4a1423b767e00a Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 14 Aug 2010 23:22:16 +0200
Subject: [PATCH] kconfig: fix savedefconfig with choice marked optional

savedefconfig failed to save the correct minimal config
when it encountered a choice marked optional.

Consider following minimal configuration:
$cat Kconfig
choice
	prompt "choice"
	optional

config A
	bool "a"

config B
	bool "b"

endchoice

$cat .config | grep -v ^#
CONFIG_A=y

$conf --savedefconfig=defconfig Kconfig

would before this fix result in an empty file, because
kconfig would assume that CONFIG_A=y is a default value.
But because the choice is optional the default is that
both A and B are =n.

Fix so we handle optional choices correct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/kconfig/confdata.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c39327e..515253f 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -497,7 +497,9 @@ int conf_write_defconfig(const char *filename)
 			/*
 			 * If symbol is a choice value and equals to the
 			 * default for a choice - skip.
-			 * But only if value is bool and equal to "y" .
+			 * But only if value is bool and equal to "y" and
+			 * choice is not "optional".
+			 * (If choice is "optional" then all values can be "n")
 			 */
 			if (sym_is_choice_value(sym)) {
 				struct symbol *cs;
@@ -505,7 +507,7 @@ int conf_write_defconfig(const char *filename)
 
 				cs = prop_get_symbol(sym_get_choice_prop(sym));
 				ds = sym_choice_default(cs);
-				if (sym == ds) {
+				if (!sym_is_optional(cs) && sym == ds) {
 					if ((sym->type == S_BOOLEAN) &&
 					    sym_get_tristate_value(sym) == yes)
 						goto next_menu;
-- 
1.6.0.6


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

* [PATCH] kconfig: fix savedefconfig with choice marked optional
@ 2010-08-14 21:29 ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2010-08-14 21:29 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, lkml

From db5b47421d4e9c2f3a35bc3aaa4a1423b767e00a Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 14 Aug 2010 23:22:16 +0200
Subject: [PATCH] kconfig: fix savedefconfig with choice marked optional

savedefconfig failed to save the correct minimal config
when it encountered a choice marked optional.

Consider following minimal configuration:
$cat Kconfig
choice
	prompt "choice"
	optional

config A
	bool "a"

config B
	bool "b"

endchoice

$cat .config | grep -v ^#
CONFIG_A=y

$conf --savedefconfig=defconfig Kconfig

would before this fix result in an empty file, because
kconfig would assume that CONFIG_A=y is a default value.
But because the choice is optional the default is that
both A and B are =n.

Fix so we handle optional choices correct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/kconfig/confdata.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c39327e..515253f 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -497,7 +497,9 @@ int conf_write_defconfig(const char *filename)
 			/*
 			 * If symbol is a choice value and equals to the
 			 * default for a choice - skip.
-			 * But only if value is bool and equal to "y" .
+			 * But only if value is bool and equal to "y" and
+			 * choice is not "optional".
+			 * (If choice is "optional" then all values can be "n")
 			 */
 			if (sym_is_choice_value(sym)) {
 				struct symbol *cs;
@@ -505,7 +507,7 @@ int conf_write_defconfig(const char *filename)
 
 				cs = prop_get_symbol(sym_get_choice_prop(sym));
 				ds = sym_choice_default(cs);
-				if (sym == ds) {
+				if (!sym_is_optional(cs) && sym == ds) {
 					if ((sym->type == S_BOOLEAN) &&
 					    sym_get_tristate_value(sym) == yes)
 						goto next_menu;
-- 
1.6.0.6


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

end of thread, other threads:[~2010-08-15  7:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-14 23:26 [PATCH] kconfig: fix savedefconfig with choice marked optional Sedat Dilek
2010-08-15  1:15 ` Sam Ravnborg
2010-08-15  7:07   ` Sedat Dilek
  -- strict thread matches above, loose matches on Subject: below --
2010-08-14 21:29 Sam Ravnborg
2010-08-14 21:29 ` Sam Ravnborg
2010-08-14 22:41 ` Michal Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.