Skip to contentSkip to conversation

scripts: make sure scripts are invoked via $(PYTHON)

PATCH In review Paolo Bonzini 2 participants 2 messages May 18, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: make sure scripts are invoked via $(PYTHON)

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.

---
 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
configure +1 -1
index bcab685cfd97..31a787153e38 100755
@@ -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
scripts/meson-buildoptions.py +0 -0
old mode 100755
new mode 100644
scripts/modinfo-collect.py +0 -0
old mode 100755
new mode 100644
scripts/modinfo-generate.py +0 -0
old mode 100755
new mode 100644
scripts/probe-gdb-support.py +0 -0
old mode 100755
new mode 100644
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Paolo Bonzini

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.

---
  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(-)
Quoted 4 lines

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

r~