diff mbox series

[v2,1/2] package/ninja: invoke python3 explicitly to configure the package

Message ID 20191111213154.19409-1-avraham.shukron@gmail.com
State Accepted
Headers show
Series [v2,1/2] package/ninja: invoke python3 explicitly to configure the package | expand

Commit Message

Avi Shukron Nov. 11, 2019, 9:31 p.m. UTC
ninja depends on python3 specifically, but the configure.py file
simply uses "env python". Where no python is selected for the target
you simply won't get a python symlink in $(HOST_DIR)/usr/bin, so the
configure.py script fails to run since it can't find "python".

Notice that in order to reproduce the issue, you must not have
python2 installed on your host machine.

Signed-off-by: Avi Shukron <avraham.shukron@gmail.com>
---
 package/ninja/ninja.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Nov. 12, 2019, 9:04 p.m. UTC | #1
On Mon, 11 Nov 2019 23:31:45 +0200
Avi Shukron <avraham.shukron@gmail.com> wrote:

> ninja depends on python3 specifically, but the configure.py file
> simply uses "env python". Where no python is selected for the target
> you simply won't get a python symlink in $(HOST_DIR)/usr/bin, so the
> configure.py script fails to run since it can't find "python".
> 
> Notice that in order to reproduce the issue, you must not have
> python2 installed on your host machine.
> 
> Signed-off-by: Avi Shukron <avraham.shukron@gmail.com>
> ---
>  package/ninja/ninja.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
Peter Korsgaard Nov. 18, 2019, 1 p.m. UTC | #2
>>>>> "Avi" == Avi Shukron <avraham.shukron@gmail.com> writes:

 > ninja depends on python3 specifically, but the configure.py file
 > simply uses "env python". Where no python is selected for the target
 > you simply won't get a python symlink in $(HOST_DIR)/usr/bin, so the
 > configure.py script fails to run since it can't find "python".

 > Notice that in order to reproduce the issue, you must not have
 > python2 installed on your host machine.

 > Signed-off-by: Avi Shukron <avraham.shukron@gmail.com>

Committed to 2019.08.x, thanks.
diff mbox series

Patch

diff --git a/package/ninja/ninja.mk b/package/ninja/ninja.mk
index 4897012150..281cd70412 100644
--- a/package/ninja/ninja.mk
+++ b/package/ninja/ninja.mk
@@ -17,7 +17,7 @@  NINJA_LICENSE_FILES = COPYING
 HOST_NINJA_DEPENDENCIES = host-python3
 
 define HOST_NINJA_BUILD_CMDS
-	(cd $(@D); ./configure.py --bootstrap)
+	(cd $(@D); $(HOST_DIR)/bin/python3 configure.py --bootstrap)
 endef
 
 define HOST_NINJA_INSTALL_CMDS