From: Peter Maydell <peter.maydell@linaro.org>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>, "John Snow" <jsnow@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>
Subject: Re: [PATCH] meson: Fix MESONINTROSPECT parsing
Date: Mon, 25 Mar 2024 17:23:29 +0000 [thread overview]
Message-ID: <CAFEAcA8_HER5ipM7rbYY=JLwNPsi6AdqyJwOdD4CHq=rViD8BQ@mail.gmail.com> (raw)
In-Reply-To: <fbc4b1e3-c504-4d79-b803-a23c866361e8@daynix.com>
On Sat, 12 Aug 2023 at 13:10, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> On 2023/08/12 15:15, Akihiko Odaki wrote:
> > The arguments in MESONINTROSPECT are quoted with shlex.quote() so it
> > must be parsed with shlex.split().
> >
> > Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism")
> > Reported-by: Michael Tokarev <mjt@tls.msk.ru>
> > Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> > ---
> > scripts/symlink-install-tree.py | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree.py
> > index 8ed97e3c94..b72563895c 100644
> > --- a/scripts/symlink-install-tree.py
> > +++ b/scripts/symlink-install-tree.py
> > @@ -4,6 +4,7 @@
> > import errno
> > import json
> > import os
> > +import shlex
> > import subprocess
> > import sys
> >
> > @@ -14,7 +15,7 @@ def destdir_join(d1: str, d2: str) -> str:
> > return str(PurePath(d1, *PurePath(d2).parts[1:]))
> >
> > introspect = os.environ.get('MESONINTROSPECT')
> > -out = subprocess.run([*introspect.split(' '), '--installed'],
> > +out = subprocess.run([*shlex.split(introspect), '--installed'],
> > stdout=subprocess.PIPE, check=True).stdout
> > for source, dest in json.loads(out).items():
> > bundle_dest = destdir_join('qemu-bundle', dest)
>
> Please do NOT merge this. This will break Windows builds. I'm putting
> this patch on hold.
>
> The problem is that Meson uses a different logic for escaping arguments
> in MESONINTROSPECT on Windows. I'll wait till Meson maintainers figure
> out how MESONINTROSPECT should be used. For details, see:
> https://github.com/mesonbuild/meson/pull/12115#issuecomment-1675863266
Am I correct in understanding from
https://github.com/mesonbuild/meson/pull/12807
that the eventual resolution that Meson upstream decided was
to restore the behaviour that regardless of platform the right
way to split the file is shlex.split()?
If so, then I think we should resurrect and apply this patch,
since at the moment configuring QEMU fails if, for instance,
the build tree directory name has a '~' character in it.
thanks
-- PMM
next prev parent reply other threads:[~2024-03-25 17:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 6:15 [PATCH] meson: Fix MESONINTROSPECT parsing Akihiko Odaki
2023-08-12 8:01 ` Michael Tokarev
2023-08-12 9:16 ` Akihiko Odaki
2023-08-12 11:13 ` Paolo Bonzini
2023-08-12 8:45 ` Philippe Mathieu-Daudé
2023-08-12 12:09 ` Akihiko Odaki
2023-08-12 13:31 ` Michael Tokarev
2024-03-25 17:23 ` Peter Maydell [this message]
2024-03-25 17:34 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA8_HER5ipM7rbYY=JLwNPsi6AdqyJwOdD4CHq=rViD8BQ@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=jsnow@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).