From: Guillaume Tucker Date: Mon, 2 Sep 2019 15:18:36 +0000 (+0100) Subject: merge_config.sh: ignore unwanted grep errors X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=60bef52c7a68257048f34ce32b8300def71a3de0;p=linux.git merge_config.sh: ignore unwanted grep errors 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 Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Masahiro Yamada --- diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index bec246719aeaf..63c8565206a45 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -179,7 +179,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"