From patchwork Fri Jun 8 21:53:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10455271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 178D9601D4 for ; Fri, 8 Jun 2018 21:53:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF694260CD for ; Fri, 8 Jun 2018 21:53:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3A1B28138; Fri, 8 Jun 2018 21:53:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F69E260CD for ; Fri, 8 Jun 2018 21:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753070AbeFHVxm (ORCPT ); Fri, 8 Jun 2018 17:53:42 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:39367 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752708AbeFHVxm (ORCPT ); Fri, 8 Jun 2018 17:53:42 -0400 Received: from ravnborg.org (unknown [158.248.196.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id C505620059; Fri, 8 Jun 2018 23:53:39 +0200 (CEST) Date: Fri, 8 Jun 2018 23:53:38 +0200 From: Sam Ravnborg To: linux-kbuild@vger.kernel.org, Masahiro Yamada Cc: Kevin Locke , Andrei Vagin Subject: [PATCH] kconfig: fix localmodconfig Message-ID: <20180608215338.GA28473@ravnborg.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=dqr19Wo4 c=1 sm=1 tr=0 a=ddpE2eP9Sid01c7MzoqXPA==:117 a=ddpE2eP9Sid01c7MzoqXPA==:17 a=kj9zAlcOel0A:10 a=7gkXJVJtAAAA:8 a=TYBLyS7eAAAA:8 a=eSYpu49gOdIddhxwtqEA:9 a=CjuIK1q_8ugA:10 a=E9Po1WZjFZOl8hwRPBS3:22 a=zvYvwCWiE4KgVXXeO06c:22 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From 47857284fd19ef953e3beb7338154924a74b62d2 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg 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 Reported-by: Andrei Vagin Signed-off-by: Sam Ravnborg Tested-by: Kevin Locke --- 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";