Skip to contentSkip to conversation

devtools: fix invalid config check when building tags

PATCH Applied Bruce Richardson 4 participants 4 messages Mar 13, 2019 – Mar 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtools: fix invalid config check when building tags

The check for a valid configuration in build-tags.sh relied on the output of "make showconfig" rather than checking directly for a config file of that name. This broke when as part of the rename of the linuxapp/bsdapp configs to just linux/freebsd, as we stopped advertising the old names even if they worked. Changing the code to just look for the config file by name fixes this issue while shortening the code too.

Fixes 218c4e68c1d9 ("mk: use linux and freebsd in config names")
Fixes aafaea3d3b70 ("devtools: add tags and cscope index generation")
---
 devtools/build-tags.sh | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
devtools/build-tags.sh +1 -8
index 753e4c23c..d395da47e 100755
@@ -129,14 +129,7 @@ ppc_64_sources()
 
 check_valid_target()
 {
-	cfgfound=false
-	allconfigs=$(make showconfigs)
-	for cfg in $allconfigs ; do
-		if [ "$cfg" = "$1" ] ; then
-			cfgfound=true
-		fi
-	done
-	if ! $cfgfound ; then
+	if [ ! -f "config/defconfig_$1" ] ; then
 		echo "Invalid config: $1"
 		print_usage
 		exit 0
Signature · 1 line
2.20.1
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Bruce Richardson

The check for a valid configuration in build-tags.sh relied on the output of "make showconfig" rather than checking directly for a config file of that name. This broke when as part of the rename of the linuxapp/bsdapp configs to just linux/freebsd, as we stopped advertising the old names even if they worked. Changing the code to just look for the config file by name fixes this issue while shortening the code too.

Fixes 218c4e68c1d9 ("mk: use linux and freebsd in config names")
Fixes aafaea3d3b70 ("devtools: add tags and cscope index generation")
Acked-by on v1 1/1
#2 lore raw
In reply to Bruce Richardson
Quoted 11 lines · Bruce Richardson

The check for a valid configuration in build-tags.sh relied on the output
of "make showconfig" rather than checking directly for a config file of
that name. This broke when as part of the rename of the linuxapp/bsdapp
configs to just linux/freebsd, as we stopped advertising the old names
even if they worked. Changing the code to just look for the config file by name fixes this issue while shortening the code too.

Quoted 5 lines
Fixes 218c4e68c1d9 ("mk: use linux and freebsd in config names")
Fixes aafaea3d3b70 ("devtools: add tags and cscope index

generation")

Quoted 24 lines
---
 devtools/build-tags.sh | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
devtools/build-tags.sh +1 -8
index 753e4c23c..d395da47e 100755
@@ -129,14 +129,7 @@ ppc_64_sources()
 
 check_valid_target()
 {
-	cfgfound=false
-	allconfigs=$(make showconfigs)
-	for cfg in $allconfigs ; do
-		if [ "$cfg" = "$1" ] ; then
-			cfgfound=true
-		fi
-	done
-	if ! $cfgfound ; then
+	if [ ! -f "config/defconfig_$1" ] ; then
 		echo "Invalid config: $1"
 		print_usage
 		exit 0
#3 lore raw
In reply to Bruce Richardson

13/03/2019 16:09, Bruce Richardson:

Quoted 11 lines

The check for a valid configuration in build-tags.sh relied on the output of "make showconfig" rather than checking directly for a config file of that name. This broke when as part of the rename of the linuxapp/bsdapp configs to just linux/freebsd, as we stopped advertising the old names even if they worked. Changing the code to just look for the config file by name fixes this issue while shortening the code too.

Fixes 218c4e68c1d9 ("mk: use linux and freebsd in config names")
Fixes aafaea3d3b70 ("devtools: add tags and cscope index generation")

Applied, thanks