summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-30 11:18:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-07 23:08:55 +0000
commit8929ffd67c6de431c2561f63c5427df6c354d30f (patch)
treed3a67f1032c39b8fbbebb2f176908ca8dca45fd1 /meta/classes/base.bbclass
parentfcf55f58ae73b4e54ea853c816c0fef0f33ca46c (diff)
downloadpoky-8929ffd67c6de431c2561f63c5427df6c354d30f.tar.gz
oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS manipulation
Several distros are now shipping "python" as python v3 contra to the original python guidelines. This causes users confusion/pain in trying to use our tools. We can just force "python" to "python2" within HOSTTOOLS to avoid this issue and hide the complexity from the user. (From OE-Core rev: b06a6cde5c5503f456f260c773cf126085e18c8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index df11c8b270..57b69492ce 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -128,6 +128,12 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
128 os.symlink(srctool, desttool) 128 os.symlink(srctool, desttool)
129 else: 129 else:
130 notfound.append(tool) 130 notfound.append(tool)
131 # Force "python" -> "python2"
132 desttool = os.path.join(dest, "python")
133 if not os.path.exists(desttool):
134 srctool = "python2"
135 os.symlink(srctool, desttool)
136
131 if notfound and fatal: 137 if notfound and fatal:
132 bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound)) 138 bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound))
133 139