Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2073005ybe; Tue, 3 Sep 2019 07:37:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlBNrOQ08KojOkRlvKWM+OfizpYJQMHzENfNYn57kP+qJ6MFhOq/a+CWX/hFQ2fZ9gSF9p X-Received: by 2002:a17:902:2f24:: with SMTP id s33mr34186885plb.314.1567521450046; Tue, 03 Sep 2019 07:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567521450; cv=none; d=google.com; s=arc-20160816; b=LJ/cCdlgpuXJThTa3g9hdSsOGuARoYywa2HHe7GFxQHGWyDpb5efeC1q6KR1gD8CaE uMBIkbqNbHvSTeEiAdXnBYEnh/CFof7ZxJfhtZlKaE6rEm2MFrgk7hZGlMrOa+GZJUC+ KSbU1Q4oNlH6tPg5rVScrrF2nkW25q1tW17dJItbr/Y4CHXihUHZ90w8tvpDwn7X+SC8 ZQamhbSWFPe0f+IFM3cRegTm6uKagKhQIFxXiBLJ98oJrsoNeSsXEerxlmnxUZx/amRi Eek/vi+yo1kbHh+/Zl//NwsWs3QvRpmlDkF5aOPtJ5GjuPJ7Y9ouy35lluvSmz8OiNTr L6tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=9ktFv0qZHrNLdzrwjcOGtLvCO084ibPuQ/N0Fl+gU7A=; b=P9ot3Glk4KeqKAHjHAF/iH8Iy0Q/9FybybPxDtr2HQq/eZ+pe3iCnKqU2NX9PpwvP+ rqkmAtL3NUiaP5tT3uIsFLAdVL5Qr1twxw73kI3eeBfO5Er1FoUPu/ZrI4QMmdf+NvYv nOdcUM987K5XAcah+e4PPr1JYY0Pkt0RjURMLWg444hfAuEzCdg4eb6zFohGt1Aa/DYP IzxOhmTeOiqVd71bzsNyfefgk7aR20xrSCxL3sSQ667mXLqJ9HWbvCZYWc3yIicSyRcJ a4yb9uVZAJslGqkMo2Mtt2wIvVVVOvZMDdyHQ0bJuyxNONy6XF8PggVorumzbD+AUA7I hH0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=pwupB7ws; 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 s8si14750698pgq.538.2019.09.03.07.37.11; Tue, 03 Sep 2019 07:37:30 -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=pwupB7ws; 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 S1729614AbfICOgM (ORCPT + 99 others); Tue, 3 Sep 2019 10:36:12 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:52847 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfICOgM (ORCPT ); Tue, 3 Sep 2019 10:36:12 -0400 Received: from mail-vk1-f181.google.com (mail-vk1-f181.google.com [209.85.221.181]) (authenticated) by conssluserg-01.nifty.com with ESMTP id x83EZwT2022252; Tue, 3 Sep 2019 23:35:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com x83EZwT2022252 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1567521359; bh=9ktFv0qZHrNLdzrwjcOGtLvCO084ibPuQ/N0Fl+gU7A=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pwupB7wsJBDjVzey/sEx5VW86n2PROIGMQzx4U5hbo4a2h1b5xQ3WdE1N979d6J9F DR+sWBkxx1pqUQpBr95IPreqDLj+oXd5PXqzsJlDGkLnuyh+1JGmEUSG+cx/Yr6T9M 8XXa7wb/o+/xYDFkxQQNQRPAxmiZ7zn/zGSIl3V7eJ5e8O3p1rQ8/LHhzq1UbOgOXy o8ZjOCmMkgfHGvJJ4Y4jgYQNLYt9m48u54KLC/kBtr3wn9wl2uncITqiOjZFA7vPdS uANvM0rSylpeKXcguYLy5cNM41i00pNLod0U4A8YGBQQTI9B+j/wUMTHmvbdidQQnh CTVSmoc3uvgjg== X-Nifty-SrcIP: [209.85.221.181] Received: by mail-vk1-f181.google.com with SMTP id q186so2377422vkb.0; Tue, 03 Sep 2019 07:35:59 -0700 (PDT) X-Gm-Message-State: APjAAAV4FuSRzkv9Azw5gmRvFJzevb9Qz9Nf3l28VgFj+68j0aeojXOu COmHAOxt1jTEGPmYzymf4qZGviU2leW3Ze8jN10= X-Received: by 2002:a1f:294a:: with SMTP id p71mr10414923vkp.74.1567521358284; Tue, 03 Sep 2019 07:35:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Tue, 3 Sep 2019 23:35:22 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] merge_config.sh: ignore unwanted grep errors To: Guillaume Tucker Cc: Mark Brown , Jon Hunter , Linux Kbuild mailing list , Linux Kernel Mailing List , kernel@collabora.com, linux-tegra@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 3, 2019 at 12:19 AM Guillaume Tucker wrote: > > The merge_config.sh script verifies that all the config options have > their expected value in the resulting file and prints any issues as > warnings. These checks aren't intended to be treated as errors given > the current implementation. However, since "set -e" was added, if the > grep command to look for a config option does not find it the script > will then abort prematurely. > > Handle the case where the grep exit status is non-zero by setting > ACTUAL_VAL to an empty string to restore previous functionality. > > Fixes: cdfca821571d ("merge_config.sh: Check error codes from make") > Signed-off-by: Guillaume Tucker > Cc: Jon Hunter > --- Applied to linux-kbuild. Thanks. > Notes: > v2: use true rather than echo as per Jon Hunter's suggestion > > 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 d924c51d28b7..f2cc10b1d404 100755 > --- a/scripts/kconfig/merge_config.sh > +++ b/scripts/kconfig/merge_config.sh > @@ -177,7 +177,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET > for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do > > REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) > - ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG") > + ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG" || true) > if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then > echo "Value requested for $CFG not in final .config" > echo "Requested value: $REQUESTED_VAL" > -- > 2.20.1 > -- Best Regards Masahiro Yamada