diff mbox series

scripts/xml-preprocess: Make sure this script is invoked via the right Python

Message ID 20231006045256.395696-1-thuth@redhat.com
State New
Headers show
Series scripts/xml-preprocess: Make sure this script is invoked via the right Python | expand

Commit Message

Thomas Huth Oct. 6, 2023, 4:52 a.m. UTC
If a script is executable and has a shebang line, Meson treats it as
a normal executable, so that this script here is run via the "python3"
binary in the $PATH. However, "python3" might not be in the $PATH at
all, or it might be a wrong version, so we should make sure to run
this script via the Python version that has been chosen for the QEMU
build process. The best way to do this is to remove the executable bit
from the access mode bits. (See also commit 4b424c757188f7a4)

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1918
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 scripts/xml-preprocess.py | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 scripts/xml-preprocess.py

Comments

Marc-André Lureau Oct. 6, 2023, 5:11 a.m. UTC | #1
On Fri, Oct 6, 2023 at 8:53 AM Thomas Huth <thuth@redhat.com> wrote:
>
> If a script is executable and has a shebang line, Meson treats it as
> a normal executable, so that this script here is run via the "python3"
> binary in the $PATH. However, "python3" might not be in the $PATH at
> all, or it might be a wrong version, so we should make sure to run
> this script via the Python version that has been chosen for the QEMU
> build process. The best way to do this is to remove the executable bit
> from the access mode bits. (See also commit 4b424c757188f7a4)
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1918
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

thanks

> ---
>  scripts/xml-preprocess.py | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  mode change 100755 => 100644 scripts/xml-preprocess.py
>
> diff --git a/scripts/xml-preprocess.py b/scripts/xml-preprocess.py
> old mode 100755
> new mode 100644
> --
> 2.41.0
>
Michael Tokarev Oct. 6, 2023, 6:42 a.m. UTC | #2
Applied to my trivial-patches tree, thanks!

/mjt
Paolo Bonzini Oct. 9, 2023, 7:01 a.m. UTC | #3
Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/scripts/xml-preprocess.py b/scripts/xml-preprocess.py
old mode 100755
new mode 100644