qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] configure: quote -D options that are passed to meson
@ 2024-05-07 10:49 Paolo Bonzini
  2024-05-07 11:23 ` Thomas Huth
  2024-05-07 11:57 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Paolo Bonzini @ 2024-05-07 10:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable

Ensure that they go through unmodified, instead of removing one layer
of quoting.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index bd85377a6ae..10fbe10ad9c 100755
--- a/configure
+++ b/configure
@@ -764,7 +764,7 @@ for opt do
   --*) meson_option_parse "$opt" "$optarg"
   ;;
   # Pass through -Dxxxx options to meson
-  -D*) meson_options="$meson_options $opt"
+  -D*) meson_option_add "$opt"
   ;;
   esac
 done
-- 
2.45.0



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

* Re: [PATCH] configure: quote -D options that are passed to meson
  2024-05-07 10:49 [PATCH] configure: quote -D options that are passed to meson Paolo Bonzini
@ 2024-05-07 11:23 ` Thomas Huth
  2024-05-07 11:57 ` Peter Maydell
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-05-07 11:23 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-stable

On 07/05/2024 12.49, Paolo Bonzini wrote:
> Ensure that they go through unmodified, instead of removing one layer
> of quoting.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index bd85377a6ae..10fbe10ad9c 100755
> --- a/configure
> +++ b/configure
> @@ -764,7 +764,7 @@ for opt do
>     --*) meson_option_parse "$opt" "$optarg"
>     ;;
>     # Pass through -Dxxxx options to meson
> -  -D*) meson_options="$meson_options $opt"
> +  -D*) meson_option_add "$opt"
>     ;;
>     esac
>   done

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH] configure: quote -D options that are passed to meson
  2024-05-07 10:49 [PATCH] configure: quote -D options that are passed to meson Paolo Bonzini
  2024-05-07 11:23 ` Thomas Huth
@ 2024-05-07 11:57 ` Peter Maydell
  2024-05-07 12:03   ` Paolo Bonzini
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2024-05-07 11:57 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, qemu-stable

On Tue, 7 May 2024 at 11:50, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Ensure that they go through unmodified, instead of removing one layer
> of quoting.

Do you have an example of what goes wrong that we could
mention in the commit message ?

thanks
-- PMM


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

* Re: [PATCH] configure: quote -D options that are passed to meson
  2024-05-07 11:57 ` Peter Maydell
@ 2024-05-07 12:03   ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2024-05-07 12:03 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-stable

On Tue, May 7, 2024 at 1:58 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 7 May 2024 at 11:50, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > Ensure that they go through unmodified, instead of removing one layer
> > of quoting.
>
> Do you have an example of what goes wrong that we could
> mention in the commit message ?

I only found it by inspection. The only case I can think of is
"-Dpkg_config_path=/home/pbonzini/a path with spaces/".

I can add the following text:

---
-D is a pretty specialized option and most options that can have spaces
do not need it (for example, c_args is covered by --extra-cflags).
Therefore it's unlikely that this causes actual trouble.  However,
a somewhat realistic failure case would be with -Dpkg_config_path
and a pkg-config directory that contains spaces.
---

Paolo



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

end of thread, other threads:[~2024-05-07 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 10:49 [PATCH] configure: quote -D options that are passed to meson Paolo Bonzini
2024-05-07 11:23 ` Thomas Huth
2024-05-07 11:57 ` Peter Maydell
2024-05-07 12:03   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).