qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts: make sure scripts are invoked via $(PYTHON)
@ 2023-05-18 11:33 Paolo Bonzini
  2023-05-18 13:19 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-05-18 11:33 UTC (permalink / raw)
  To: qemu-devel

Some scripts are invoked via the first "python3" binary in the PATH,
because they are executable and their shebang line is "#! /usr/bin/env
python3".  To enforce usage of $(PYTHON), make them nonexecutable.
Scripts invoked via meson need nothing else, and meson-buildoptions.py
is already using $(PYTHON).  For probe-gdb-support.py however the
invocation in the configure script has to be adjusted.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                     | 2 +-
 scripts/meson-buildoptions.py | 0
 scripts/modinfo-collect.py    | 0
 scripts/modinfo-generate.py   | 0
 scripts/probe-gdb-support.py  | 0
 5 files changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 => 100644 scripts/meson-buildoptions.py
 mode change 100755 => 100644 scripts/modinfo-collect.py
 mode change 100755 => 100644 scripts/modinfo-generate.py
 mode change 100755 => 100644 scripts/probe-gdb-support.py

diff --git a/configure b/configure
index bcab685cfd97..31a787153e38 100755
--- a/configure
+++ b/configure
@@ -1767,7 +1767,7 @@ if test -n "$gdb_bin"; then
     gdb_version=$($gdb_bin --version | head -n 1)
     if version_ge ${gdb_version##* } 9.1; then
         echo "HAVE_GDB_BIN=$gdb_bin" >> $config_host_mak
-        gdb_arches=$("$source_path/scripts/probe-gdb-support.py" $gdb_bin)
+        gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
     else
         gdb_bin=""
     fi
diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py
old mode 100755
new mode 100644
diff --git a/scripts/modinfo-collect.py b/scripts/modinfo-collect.py
old mode 100755
new mode 100644
diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py
old mode 100755
new mode 100644
diff --git a/scripts/probe-gdb-support.py b/scripts/probe-gdb-support.py
old mode 100755
new mode 100644
-- 
2.40.1



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

* Re: [PATCH] scripts: make sure scripts are invoked via $(PYTHON)
  2023-05-18 11:33 [PATCH] scripts: make sure scripts are invoked via $(PYTHON) Paolo Bonzini
@ 2023-05-18 13:19 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2023-05-18 13:19 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 5/18/23 04:33, Paolo Bonzini wrote:
> Some scripts are invoked via the first "python3" binary in the PATH,
> because they are executable and their shebang line is "#! /usr/bin/env
> python3".  To enforce usage of $(PYTHON), make them nonexecutable.
> Scripts invoked via meson need nothing else, and meson-buildoptions.py
> is already using $(PYTHON).  For probe-gdb-support.py however the
> invocation in the configure script has to be adjusted.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   configure                     | 2 +-
>   scripts/meson-buildoptions.py | 0
>   scripts/modinfo-collect.py    | 0
>   scripts/modinfo-generate.py   | 0
>   scripts/probe-gdb-support.py  | 0
>   5 files changed, 1 insertion(+), 1 deletion(-)
>   mode change 100755 => 100644 scripts/meson-buildoptions.py
>   mode change 100755 => 100644 scripts/modinfo-collect.py
>   mode change 100755 => 100644 scripts/modinfo-generate.py
>   mode change 100755 => 100644 scripts/probe-gdb-support.py

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

end of thread, other threads:[~2023-05-18 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-18 11:33 [PATCH] scripts: make sure scripts are invoked via $(PYTHON) Paolo Bonzini
2023-05-18 13:19 ` Richard Henderson

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).