From patchwork Mon Sep 2 15:18:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Tucker X-Patchwork-Id: 172761 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4406602ily; Mon, 2 Sep 2019 08:19:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqycJ9iYPKe3x4QQlkliAL7Zlq81BFcECrXhoejVXhpxe+XE0F2LxLf/jk7eyOB4EBCZ2z86 X-Received: by 2002:a17:902:b70f:: with SMTP id d15mr8996469pls.285.1567437551598; Mon, 02 Sep 2019 08:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567437551; cv=none; d=google.com; s=arc-20160816; b=JJjB4gwrm6ebrj5QN6cs4evTwmtJ3lJo3APs+KILx0qra/vOtTPtXGZj3jSqaYBcxj FkjTXoeyvh94F0v3Y/DyqBso55vyNMIMzoedP2eCfpZY7qiSsFQi0keXUjnI//VyDFnB 5Pnjzo51RtqVQ4mhvdX3Gk8TMF02+fXKm1dCaMeZHUXaoluWVHuAEn8ahDF+GHAC7iX+ 160gMt9LXcZotKk/1MYcYU7qAvfMoBQZees6kWQz80ChF5ctK0nt3ZsAlIUqxWX/qNaT bLy5NeDjmefKtXacAFmqcPc2JaMPG0luad4mBz9nONw+200Yq5DYLyFwJsR7ZiArtHsw W6Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=OQ06J+IbI4rAxRLPlptzn8jwo9KNzB5eu7uyUKaM04o=; b=ojFy23QS4TaiXvdVlQaATYCDfEgvDVnZcIogtPz2e51UvHq0shHE0uO9OrLEXIt6yu yQSnn+7/OOHX+FMfV+YP/nd05PLe5FQo1ycHGoZI/85/lNalTwyv3uYQnPGc3Bq6nZVM f7M7jSOpb0YSETjIqo4G5FsId57b5kLonZwAO+VyHkmTtM4R/DmLJtVkoodcoT3Ugj7p 1JEUcGGzRLoFyLAwLbTcHlItXH+TnXMYbW/6mv81+E1vlmvKsKLJQDUn/ig3kPCejn9g otVOplHEvpslpaf/ZtbIDit4ch2yduYfTw0ceFGr1ZzVrbybEqaOu/rUbJbSbpRLV13b cM3Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si12037839pll.357.2019.09.02.08.19.11; Mon, 02 Sep 2019 08:19:11 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731948AbfIBPTK (ORCPT + 28 others); Mon, 2 Sep 2019 11:19:10 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51084 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbfIBPTK (ORCPT ); Mon, 2 Sep 2019 11:19:10 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id 5100228A869 From: Guillaume Tucker To: Masahiro Yamada , Mark Brown , Jon Hunter Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, linux-tegra@vger.kernel.org, Guillaume Tucker Subject: [PATCH v2] merge_config.sh: ignore unwanted grep errors Date: Mon, 2 Sep 2019 16:18:36 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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(-) -- 2.20.1 Acked-by: Jon Hunter Tested-by: Jon Hunter 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"