* [PATCH] kconfig: fix localmodconfig
@ 2018-06-08 21:53 Sam Ravnborg
2018-06-09 5:25 ` Kevin Locke
2018-06-10 13:29 ` Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Sam Ravnborg @ 2018-06-08 21:53 UTC (permalink / raw)
To: linux-kbuild, Masahiro Yamada; +Cc: Kevin Locke, Andrei Vagin
From 47857284fd19ef953e3beb7338154924a74b62d2 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri, 8 Jun 2018 23:48:31 +0200
Subject: [PATCH 1/1] kconfig: fix localmodconfig
When kconfig syntax moved to use $(FOO) for environment variables
localmodconfig was not updated.
Fix so it now works with the new syntax $(FOO)
Fixes: 104daea149c45cc84842ce77a9bd6436d19f3dd8 ("kconfig: reference environment variables directly and remove 'option env='")
Reported-by: Kevin Locke <kevin@kevinlocke.name>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
scripts/kconfig/streamline_config.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index a2e83ab17de3..4686531e2f8c 100755
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -165,10 +165,10 @@ sub read_kconfig {
my $last_source = "";
# Check for any environment variables used
- while ($source =~ /\$(\w+)/ && $last_source ne $source) {
+ while ($source =~ /\$\((\w+)\)/ && $last_source ne $source) {
my $env = $1;
$last_source = $source;
- $source =~ s/\$$env/$ENV{$env}/;
+ $source =~ s/\$\($env\)/$ENV{$env}/;
}
open(my $kinfile, '<', $source) || die "Can't open $kconfig";
--
2.12.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kconfig: fix localmodconfig
2018-06-08 21:53 [PATCH] kconfig: fix localmodconfig Sam Ravnborg
@ 2018-06-09 5:25 ` Kevin Locke
2018-06-10 13:29 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Locke @ 2018-06-09 5:25 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kbuild, Masahiro Yamada, Andrei Vagin
On Fri, 2018-06-08 at 23:53 +0200, Sam Ravnborg wrote:
> When kconfig syntax moved to use $(FOO) for environment variables
> localmodconfig was not updated.
> Fix so it now works with the new syntax $(FOO)
>
> Fixes: 104daea149c45cc84842ce77a9bd6436d19f3dd8 ("kconfig: reference environment variables directly and remove 'option env='")
I can confirm `make localmodconfig` from 104daea149c4 with this patch
applied creates the same .config as it did in 104daea149c4^ and that
it creates a plausible .config (which I haven't built/tested yet) when
applied to master.
Works for me. Thanks for the very fast fix!
Tested-by: Kevin Locke <kevin@kevinlocke.name>
Cheers,
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kconfig: fix localmodconfig
2018-06-08 21:53 [PATCH] kconfig: fix localmodconfig Sam Ravnborg
2018-06-09 5:25 ` Kevin Locke
@ 2018-06-10 13:29 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-06-10 13:29 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Linux Kbuild mailing list, Kevin Locke, Andrei Vagin
2018-06-09 6:53 GMT+09:00 Sam Ravnborg <sam@ravnborg.org>:
> From 47857284fd19ef953e3beb7338154924a74b62d2 Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Fri, 8 Jun 2018 23:48:31 +0200
> Subject: [PATCH 1/1] kconfig: fix localmodconfig
>
> When kconfig syntax moved to use $(FOO) for environment variables
> localmodconfig was not updated.
> Fix so it now works with the new syntax $(FOO)
>
> Fixes: 104daea149c45cc84842ce77a9bd6436d19f3dd8 ("kconfig: reference environment variables directly and remove 'option env='")
> Reported-by: Kevin Locke <kevin@kevinlocke.name>
> Reported-by: Andrei Vagin <avagin@virtuozzo.com>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
Applied to linux-kbuild. Thanks!
> scripts/kconfig/streamline_config.pl | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index a2e83ab17de3..4686531e2f8c 100755
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -165,10 +165,10 @@ sub read_kconfig {
> my $last_source = "";
>
> # Check for any environment variables used
> - while ($source =~ /\$(\w+)/ && $last_source ne $source) {
> + while ($source =~ /\$\((\w+)\)/ && $last_source ne $source) {
> my $env = $1;
> $last_source = $source;
> - $source =~ s/\$$env/$ENV{$env}/;
> + $source =~ s/\$\($env\)/$ENV{$env}/;
> }
>
> open(my $kinfile, '<', $source) || die "Can't open $kconfig";
> --
> 2.12.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-10 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-08 21:53 [PATCH] kconfig: fix localmodconfig Sam Ravnborg
2018-06-09 5:25 ` Kevin Locke
2018-06-10 13:29 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox