Re: [PATCH 2/2] merge_config.sh: Add option to display redundant configs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12-03-22 06:05 PM, John Stultz wrote:
Provide a -r option to display when fragments contain reundent
options

CC: Michal Marek<mmarek@xxxxxxx>
CC: Bruce.Ashfield@xxxxxxxxxxxxx
CC: Darren Hart<dvhart@xxxxxxxxxxxxxxx>
Signed-off-by: John Stultz<john.stultz@xxxxxxxxxx>

I've got a few similar tweaks that I'll dust off and send out
(but I'll likely miss this window), but this adds that little
prod needed to track down where the dup is coming from.

So I like the option.

Acked-by: Bruce Ashfield <bruce.ashfield@xxxxxxxxxxxxx>

Cheers,

Bruce

---
  scripts/kconfig/merge_config.sh |   11 +++++++++++
  1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index ceadf0e..d92edc3 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -31,10 +31,12 @@ usage() {
  	echo "  -h    display this help text"
  	echo "  -m    only merge the fragments, do not execute the make command"
  	echo "  -n    use allnoconfig instead of alldefconfig"
+	echo "  -r    list redundant enteries when merging fragments"
  }

  MAKE=true
  ALLTARGET=alldefconfig
+WARNREDUN=false

  while true; do
  	case $1 in
@@ -52,6 +54,11 @@ while true; do
  		usage
  		exit
  		;;
+	"-r")
+		WARNREDUN=true
+		shift
+		continue
+		;;
  	*)
  		break
  		;;
@@ -79,6 +86,10 @@ for MERGE_FILE in $MERGE_LIST ; do
  			echo Previous  value: $PREV_VAL
  			echo New value:       $NEW_VAL
  			echo
+			else
+			if [ "$WARNREDUN" = "true" ]; then
+			echo Value of $CFG is redundant by fragment $MERGE_FILE:
+			fi
  			fi
  			sed -i "/$CFG[ =]/d" $TMP_FILE
  		fi

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux