Skip to contentSkip to conversation

merge_config.sh updates for 3.4?

PATCH In review John Stultz 4 participants 9 messages Mar 22, 2012 – Mar 30, 2012

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/2 merge_config.sh: Set execute bit

In reply to John Stultz

Somehow the merge_config.sh script didn't get its execute bit set when it was merged. Fix this.

---

 0 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/kconfig/merge_config.sh
scripts/kconfig/merge_config.sh +0 -0
old mode 100644
new mode 100755
Signature · 1 line
1.7.3.2.146.gca209
#5 lore raw

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

In reply to John Stultz

Provide a -r option to display when fragments contain reundent options

---
 scripts/kconfig/merge_config.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
scripts/kconfig/merge_config.sh +11 -0
index ceadf0e..d92edc3 100755
@@ -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
Signature · 1 line
1.7.3.2.146.gca209
#0 lore raw

cover merge_config.sh updates for 3.4?

Hey Michal,
Just wanted to send you a few small updates
for the merge_config.sh script.

Let me know if these look ok for 3.4, or if you'd like to defer them for later.

thanks
-john

CC Michal Marek <[email protected]>
CC Darren Hart <[email protected]>

John Stultz (2):
merge_config.sh: Set execute bit merge_config.sh: Add option to display redundant configs

 scripts/kconfig/merge_config.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/kconfig/merge_config.sh
Signature · 1 line
1.7.3.2.146.gca209
#6 lore raw

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

In reply to John Stultz

A few spelling nitpics :-)

Quoted 1 line · John Stultz

Provide a -r option to display when fragments contain reundent

s/reundent/redundant/

Quoted 15 lines

options

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

scripts/kconfig/merge_config.sh usage() { · line 34

Quoted 4 lines
scripts/kconfig/merge_config.sh +1 -0
@@ -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"

s/enteries/entries/

Quoted 21 lines
scripts/kconfig/merge_config.sh +6 -0
 }
 
 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
 		;;

scripts/kconfig/merge_config.sh for MERGE_FILE in $MERGE_LIST ; do · line 89

Quoted 4 lines
scripts/kconfig/merge_config.sh +1 -0
@@ -79,6 +86,10 @@ for MERGE_FILE in $MERGE_LIST ; do
 			echo Previous  value: $PREV_VAL
 			echo New value:       $NEW_VAL
 			echo
+			else

Can this just be an elif and avoid the nested if block?

scripts/kconfig/merge_config.sh for MERGE_FILE in $MERGE_LIST ; do · line 92

Quoted 3 lines
scripts/kconfig/merge_config.sh +3 -0
+			if [ "$WARNREDUN" = "true" ]; then
+			echo Value of $CFG is redundant by fragment $MERGE_FILE:
+			fi

No indentation... is that just my MUA?

Quoted 3 lines
scripts/kconfig/merge_config.sh +0 -0
 			fi
 			sed -i "/$CFG[ =]/d" $TMP_FILE
 		fi
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] merge_config.sh: Set execute bit

In reply to John Stultz
Quoted 7 lines · John Stultz

Somehow the merge_config.sh script didn't get its execute bit set when it was merged. Fix this.

Quoted 7 lines

---

 0 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/kconfig/merge_config.sh
scripts/kconfig/merge_config.sh +0 -0
old mode 100644
new mode 100755
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] merge_config.sh: Set execute bit

In reply to John Stultz
Quoted 7 lines · John Stultz

Somehow the merge_config.sh script didn't get its execute bit set when it was merged. Fix this.

Bruce

Quoted 7 lines

---

  0 files changed, 0 insertions(+), 0 deletions(-)

mode change 100644 => 100755 scripts/kconfig/merge_config.sh

scripts/kconfig/merge_config.sh +0 -0
old mode 100644
new mode 100755
Acked-by on v1 2/2
#8 lore raw

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

In reply to John Stultz
Quoted 7 lines · John Stultz

Provide a -r option to display when fragments contain reundent options

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.

Cheers,

Bruce

Quoted 44 lines
---
  scripts/kconfig/merge_config.sh |   11 +++++++++++
  1 files changed, 11 insertions(+), 0 deletions(-)
scripts/kconfig/merge_config.sh +11 -0
index ceadf0e..d92edc3 100755
@@ -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
#7 lore raw

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

In reply to Darren Hart
Quoted 1 line · Darren Hart

A few spelling nitpics :-)

Thanks for the fixes, just sent out a new rev.
-john

#4 lore raw

Re: [PATCH 1/2] merge_config.sh: Set execute bit

In reply to John Stultz
Quoted 2 lines · John Stultz

Somehow the merge_config.sh script didn't get its execute bit set when it was merged. Fix this.

Most likely non-git diff was used as carrier at some point.

scripts/kconfig/merge_config.sh

Quoted 12 lines

---

 0 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/kconfig/merge_config.sh
scripts/kconfig/merge_config.sh +0 -0
old mode 100644
new mode 100755

Applied to kbuild.git#misc, thanks.

Michal