[PATCH] configure: check for $download value properly

Michal Privoznik posted 1 patch 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/3236bc555c76dcd561d38a3aea6e8489e917bc15.1686124161.git.mprivozn@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] configure: check for $download value properly
Posted by Michal Privoznik 11 months ago
If configure was invoked with --disable-download and git
submodules were not checked out a warning is produced and the
configure script fails. But the $download variable (which
reflects the enable/disable download argument) is checked for in
a weird fashion:

  test -f "$download" = disabled

Drop the '-f' to check for the actual value of the variable.

Fixes: 2019cabfee0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 8765b88e12..8a638dd82a 100755
--- a/configure
+++ b/configure
@@ -767,7 +767,7 @@ if test "$plugins" = "yes" -a "$tcg" = "disabled"; then
 fi
 
 if ! test -f "$source_path/subprojects/keycodemapdb/README" \
-    && test -f "$download" = disabled
+    && test "$download" = disabled
 then
     echo
     echo "ERROR: missing subprojects"
-- 
2.39.3
Re: [PATCH] configure: check for $download value properly
Posted by Paolo Bonzini 11 months ago
Queued, thanks.

Paolo
Re: [PATCH] configure: check for $download value properly
Posted by Philippe Mathieu-Daudé 11 months ago
On 7/6/23 09:50, Michal Privoznik wrote:
> If configure was invoked with --disable-download and git
> submodules were not checked out a warning is produced and the
> configure script fails. But the $download variable (which
> reflects the enable/disable download argument) is checked for in
> a weird fashion:
> 
>    test -f "$download" = disabled
> 
> Drop the '-f' to check for the actual value of the variable.
> 
> Fixes: 2019cabfee0
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>