From 04cca669b237337cc8734788c3ad968aa8e0b57f Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 29 Mar 2022 08:39:58 +0200 Subject: tests/lcitool: Do not use a hard-coded /usr/bin/python3 as python interpreter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220329063958.262669-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- tests/lcitool/Makefile.include | 2 +- tests/lcitool/refresh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/lcitool') diff --git a/tests/lcitool/Makefile.include b/tests/lcitool/Makefile.include index 6b215ad..3780185 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 1f00281..2d198ad 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # # Re-generate container recipes # -- cgit v1.1