* [PATCH] merge_config.sh: do not report some differencess between input and output
[not found] <CGME20230203123220eucas1p2f9686f08bcb22cf1e21aefd25070282a@eucas1p2.samsung.com>
@ 2023-02-03 12:31 ` Łukasz Stelmach
2023-02-04 18:49 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Łukasz Stelmach @ 2023-02-03 12:31 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Marek Szyprowski, Łukasz Stelmach, linux-kbuild,
linux-kernel
If an input config file contains CONFIG_FOO=n the output one
will contain a line '# CONFIG_FOO is not set'. merge_config.sh
should not report it as difference because the end result of
CONFIG_FOO being disabled is achieved.
Inexistence of CONFIG_FOO (because of unment dependencies) in case
CONFIG_FOO=n is requested, should also be ignored.
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
---
scripts/kconfig/merge_config.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index e5b46980c22a..c6fd6722f1a4 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -196,9 +196,13 @@ 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" || true)
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
- echo "Value requested for $CFG not in final .config"
- echo "Requested value: $REQUESTED_VAL"
- echo "Actual value: $ACTUAL_VAL"
- echo ""
+ if [ "x$REQUESTED_VAL" != "x$CFG=n" -o \
+ \( "x$ACTUAL_VAL" != "x" -a \
+ "x$ACTUAL_VAL" != "x# $CFG is not set" \) ]; then
+ echo "Value requested for $CFG not in final .config"
+ echo "Requested value: $REQUESTED_VAL"
+ echo "Actual value: $ACTUAL_VAL"
+ echo ""
+ fi
fi
done
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] merge_config.sh: do not report some differencess between input and output
2023-02-03 12:31 ` [PATCH] merge_config.sh: do not report some differencess between input and output Łukasz Stelmach
@ 2023-02-04 18:49 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2023-02-04 18:49 UTC (permalink / raw)
To: Łukasz Stelmach; +Cc: Marek Szyprowski, linux-kbuild, linux-kernel
On Fri, Feb 3, 2023 at 9:32 PM Łukasz Stelmach <l.stelmach@samsung.com> wrote:
>
> If an input config file contains CONFIG_FOO=n the output one
> will contain a line '# CONFIG_FOO is not set'. merge_config.sh
> should not report it as difference because the end result of
> CONFIG_FOO being disabled is achieved.
>
> Inexistence of CONFIG_FOO (because of unment dependencies) in case
> CONFIG_FOO=n is requested, should also be ignored.
>
> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
> ---
> scripts/kconfig/merge_config.sh | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
> index e5b46980c22a..c6fd6722f1a4 100755
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -196,9 +196,13 @@ 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" || true)
> if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
> - echo "Value requested for $CFG not in final .config"
> - echo "Requested value: $REQUESTED_VAL"
> - echo "Actual value: $ACTUAL_VAL"
> - echo ""
> + if [ "x$REQUESTED_VAL" != "x$CFG=n" -o \
> + \( "x$ACTUAL_VAL" != "x" -a \
> + "x$ACTUAL_VAL" != "x# $CFG is not set" \) ]; then
> + echo "Value requested for $CFG not in final .config"
> + echo "Requested value: $REQUESTED_VAL"
> + echo "Actual value: $ACTUAL_VAL"
> + echo ""
> + fi
> fi
> done
> --
> 2.30.2
>
[Problem 1]
The behaviour is inconsistent
between =n and "is not set".
Requested: CONFIG_FOO=n
Actual : missing due to unmet dep
-> suppress the report
Requested: CONFIG_FOO is not set
Actual : missing due to unmet dep
-> show the report
[Problem 2]
This patch introduces another consistency
because line 148 may report something similar.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-04 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20230203123220eucas1p2f9686f08bcb22cf1e21aefd25070282a@eucas1p2.samsung.com>
2023-02-03 12:31 ` [PATCH] merge_config.sh: do not report some differencess between input and output Łukasz Stelmach
2023-02-04 18:49 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).