diff mbox series

[1/5] configure: Add missing POSIX-required space

Message ID 20220720152631.450903-2-peter.maydell@linaro.org
State Superseded
Headers show
Series configure: fix some non-portabilities | expand

Commit Message

Peter Maydell July 20, 2022, 3:26 p.m. UTC
In commit 7d7dbf9dc15be6e1 we added a line to the configure script
which is not valid POSIX shell syntax, because it is missing a space
after a '!' character. shellcheck diagnoses this:

if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
    ^-- SC1035: You are missing a required space after the !.

and the OpenBSD shell will not correctly handle this without the space.

Fixes: 7d7dbf9dc15be6e1 ("configure: replace --enable/disable-git-update with --with-git-submodules")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
David Gilbert noted the OpenBSD issue on IRC -- I have not tested
this fix there myself.
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth July 20, 2022, 3:30 p.m. UTC | #1
On 20/07/2022 17.26, Peter Maydell wrote:
> In commit 7d7dbf9dc15be6e1 we added a line to the configure script
> which is not valid POSIX shell syntax, because it is missing a space
> after a '!' character. shellcheck diagnoses this:
> 
> if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
>      ^-- SC1035: You are missing a required space after the !.
> 
> and the OpenBSD shell will not correctly handle this without the space.
> 
> Fixes: 7d7dbf9dc15be6e1 ("configure: replace --enable/disable-git-update with --with-git-submodules")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> David Gilbert noted the OpenBSD issue on IRC -- I have not tested
> this fix there myself.
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 35e0b281985..dec6f030346 100755
> --- a/configure
> +++ b/configure
> @@ -2425,7 +2425,7 @@ else
>       cxx=
>   fi
>   
> -if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
> +if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
>       exit 1
>   fi
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>
Dr. David Alan Gilbert July 20, 2022, 4:01 p.m. UTC | #2
* Peter Maydell (peter.maydell@linaro.org) wrote:
> In commit 7d7dbf9dc15be6e1 we added a line to the configure script
> which is not valid POSIX shell syntax, because it is missing a space
> after a '!' character. shellcheck diagnoses this:
> 
> if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
>     ^-- SC1035: You are missing a required space after the !.
> 
> and the OpenBSD shell will not correctly handle this without the space.
> 
> Fixes: 7d7dbf9dc15be6e1 ("configure: replace --enable/disable-git-update with --with-git-submodules")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> David Gilbert noted the OpenBSD issue on IRC -- I have not tested
> this fix there myself.

Fixed it for me, so

Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 35e0b281985..dec6f030346 100755
> --- a/configure
> +++ b/configure
> @@ -2425,7 +2425,7 @@ else
>      cxx=
>  fi
>  
> -if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
> +if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
>      exit 1
>  fi
>  
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/configure b/configure
index 35e0b281985..dec6f030346 100755
--- a/configure
+++ b/configure
@@ -2425,7 +2425,7 @@  else
     cxx=
 fi
 
-if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
+if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
     exit 1
 fi