Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1822856imd; Fri, 2 Nov 2018 00:55:05 -0700 (PDT) X-Google-Smtp-Source: AJdET5dT3OS7+CgokihzLgij19iD0M/UjlKtDK7voKciWgID0IEn6afufcmZrbxWwca9LCZlRJcw X-Received: by 2002:a62:b802:: with SMTP id p2-v6mr10771524pfe.1.1541145305337; Fri, 02 Nov 2018 00:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541145305; cv=none; d=google.com; s=arc-20160816; b=ioHf+oy56zjDmAU8kvU1JWZi0pAMiZHxVoLtMm7Q3n/UTKTe+LUf1RklCj9Jrw4C/T h+xschkX/Qquq4Hmks7LHZ0QO0EtabBP5t4GfPAUWUIZdVrpYokUA9IHgzf2c3QF7Tnz 3CotCrTEyLmQN3/EDIwV4cpiVr9/Leym3Tf/CYTCXx6pVcoQbAg8RKtqQWZlYqWpLWQD mrHZb6AzqeuOt9i4367NFNs1py8DctR9ER2PwxWpQkIj5NjJsvG1FdtXO5GbNAZ5EJHs CZSSfx3iORJ7e98J/78Dv1ifAHDofntw4eGwZqMjFsk8OPUKZsOvUHVwG4SwVOZdymOG eamg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=gWWzwPrnLaTVWNF8GlqDpCX3YpifmN/Gi8o7HznrAK4=; b=kxpJQ/kjON56akq5AMW2GSg7iBqe+NRydlYUoOs4Ow0o4nBj48ZNDN7/r8U6UvIS5J HssNiNX4U1G6AgH1JJwl+BMGFqklGUR2T2C/emxg1QHeyP3PyglM/JpEEYQSGmE8HUXf /1Yt9WZt+QqFrfDNtWl05MRosirr/bW5X54V2dPsJJKtlPdrWVeaOWIvFJwKy7MF2gws s7Js2LxTdAEe9KxEPxBeyF1zPWascoFHLT/DpbyvGUCjM34+27FCINaDUN22pqs01r60 F2detjR7Z+lDPK4PsDXJgN5rTq0HNv/2TJKb2elZ6k+BZqE6eOnukdU0zPuMEXI4JRsX l6Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TAjETD4a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h187-v6si35306884pfc.62.2018.11.02.00.54.51; Fri, 02 Nov 2018 00:55:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TAjETD4a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728481AbeKBQ7L (ORCPT + 99 others); Fri, 2 Nov 2018 12:59:11 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:56757 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727551AbeKBQ7L (ORCPT ); Fri, 2 Nov 2018 12:59:11 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wA27qdTT019534; Fri, 2 Nov 2018 16:52:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wA27qdTT019534 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1541145160; bh=gWWzwPrnLaTVWNF8GlqDpCX3YpifmN/Gi8o7HznrAK4=; h=From:To:Cc:Subject:Date:From; b=TAjETD4acqACzqz8BXAIWAl/H8ZZ45E62HrpSIXm40Nx14txWsljqyjqP829xYzZ6 +NXQaMWRCsh5xoH299PscGeCJEb3egHlFQRqJSfx7C2Vnyvf+2Y3HpYhjSsUUChjAY e4z+EIsCVXfDHgO5o1WY+bCtMwnH6AAk83UiLNqFvHNiuzmWFi4ShK9zjETa1MJMko dVQif6IumAAdw4mx3P94fz8zpQHSlqs1oIxyW6ZMi9KppzDELy+YJXlRGMbdOj34f+ nxoDeBAQw7xRdDPr0lHA6x0+UPXlA46Z1B0H+gM4LfdvXwk5QP9yV3LPtJWrGbOHxZ 4yAlpO6aN5ycQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Petr Vorel , Nasser , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] kconfig: merge_config: avoid false positive matches from comment lines Date: Fri, 2 Nov 2018 16:52:31 +0900 Message-Id: <1541145151-7319-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current SED_CONFIG_EXP could match to comment lines in config fragment files, especially when CONFIG_PREFIX_ is empty. For example, Buildroot uses empty prefixing; starting symbols with BR2_ is just convention. Make the sed expression more robust against false positives from comment lines. The new sed expression matches to config options followed by '=' or ' is not set'. Signed-off-by: Masahiro Yamada --- scripts/kconfig/merge_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 7067a9f..180b523 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -103,7 +103,7 @@ if [ ! -r "$INITFILE" ]; then fi MERGE_LIST=$* -SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p" +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)\(=.*\| is not set$\)/\2/p" TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) -- 2.7.4