All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] devtools: fix invalid config check when building tags
@ 2019-03-13 15:09 Bruce Richardson
  2019-03-13 15:16 ` Ferruh Yigit
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bruce Richardson @ 2019-03-13 15:09 UTC (permalink / raw)
  To: thomas, ferruh.yigit, jerin.jacob; +Cc: dev, 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")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/build-tags.sh | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/devtools/build-tags.sh b/devtools/build-tags.sh
index 753e4c23c..d395da47e 100755
--- a/devtools/build-tags.sh
+++ b/devtools/build-tags.sh
@@ -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
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] devtools: fix invalid config check when building tags
  2019-03-13 15:09 [PATCH] devtools: fix invalid config check when building tags Bruce Richardson
@ 2019-03-13 15:16 ` Ferruh Yigit
  2019-03-14 20:40 ` Jerin Jacob Kollanukkaran
  2019-03-26 23:57 ` Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-03-13 15:16 UTC (permalink / raw)
  To: Bruce Richardson, thomas, jerin.jacob; +Cc: dev

On 3/13/2019 3:09 PM, Bruce Richardson wrote:
> 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")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] devtools: fix invalid config check when building tags
  2019-03-13 15:09 [PATCH] devtools: fix invalid config check when building tags Bruce Richardson
  2019-03-13 15:16 ` Ferruh Yigit
@ 2019-03-14 20:40 ` Jerin Jacob Kollanukkaran
  2019-03-26 23:57 ` Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-03-14 20:40 UTC (permalink / raw)
  To: thomas, jerin.jacob, bruce.richardson, ferruh.yigit; +Cc: dev

On Wed, 2019-03-13 at 15:09 +0000, Bruce Richardson wrote:
> 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")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>


Acked-by: Jerin Jacob <jerinj@marvell.com>

> ---
>  devtools/build-tags.sh | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/devtools/build-tags.sh b/devtools/build-tags.sh
> index 753e4c23c..d395da47e 100755
> --- a/devtools/build-tags.sh
> +++ b/devtools/build-tags.sh
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] devtools: fix invalid config check when building tags
  2019-03-13 15:09 [PATCH] devtools: fix invalid config check when building tags Bruce Richardson
  2019-03-13 15:16 ` Ferruh Yigit
  2019-03-14 20:40 ` Jerin Jacob Kollanukkaran
@ 2019-03-26 23:57 ` Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2019-03-26 23:57 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, ferruh.yigit, jerin.jacob

13/03/2019 16:09, 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")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-26 23:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 15:09 [PATCH] devtools: fix invalid config check when building tags Bruce Richardson
2019-03-13 15:16 ` Ferruh Yigit
2019-03-14 20:40 ` Jerin Jacob Kollanukkaran
2019-03-26 23:57 ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.