qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/lcitool: Do not use a hard-coded /usr/bin/python3 as p


From: Laurent Vivier
Subject: Re: [PATCH] tests/lcitool: Do not use a hard-coded /usr/bin/python3 as python interpreter
Date: Thu, 31 Mar 2022 21:33:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

Le 29/03/2022 à 08:39, Thomas Huth a écrit :
When running "make lcitool-refresh", this currently uses the hard-coded
/usr/bin/python3 from the script's shebang line for running Python.
That's bad, since neither /usr/bin/python3 is guaranteed to exist, nor
does it honor the python interpreter that the user might have chosen
while running the "configure" script. Thus let's rather use $(PYTHON)
in the Makefile, and improve the shebang line in the script in case
someone runs this directly.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
  tests/lcitool/Makefile.include | 2 +-
  tests/lcitool/refresh          | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/lcitool/Makefile.include b/tests/lcitool/Makefile.include
index 6b215adcd1..3780185c7c 100644
--- a/tests/lcitool/Makefile.include
+++ b/tests/lcitool/Makefile.include
@@ -14,4 +14,4 @@ lcitool-help: lcitool
lcitool-refresh:
        $(call quiet-command, cd $(SRC_PATH) && git submodule update --init 
tests/lcitool/libvirt-ci)
-       $(call quiet-command, $(LCITOOL_REFRESH))
+       $(call quiet-command, $(PYTHON) $(LCITOOL_REFRESH))
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index 1f00281b44..2d198ad281 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
  #
  # Re-generate container recipes
  #

Applied to my trivial-patches branch.

Thanks,
Laurent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]