Skip to content

Commit 60bef52

Browse files
gctuckermasahir0y
authored andcommitted
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: cdfca82 ("merge_config.sh: Check error codes from make") Signed-off-by: Guillaume Tucker <[email protected]> Acked-by: Jon Hunter <[email protected]> Tested-by: Jon Hunter <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 54b8ae6 commit 60bef52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/kconfig/merge_config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
179179
for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do
180180

181181
REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
182-
ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG")
182+
ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG" || true)
183183
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
184184
echo "Value requested for $CFG not in final .config"
185185
echo "Requested value: $REQUESTED_VAL"

0 commit comments

Comments
 (0)