summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorTzu Hsiang Lin <t9360341@ntut.org.tw>2018-07-26 00:26:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 13:51:02 +0100
commitccbb13fb661af127a6b2e3cc3d5fc44e84aa7dfe (patch)
tree791552477b82e076fc71203555070a80fef3463f /bitbake
parent13c465663d0d1835773fb30baba345396cf0906e (diff)
downloadpoky-ccbb13fb661af127a6b2e3cc3d5fc44e84aa7dfe.tar.gz
bitbake: fetch2: fix import error for Python 3.6.5
When running bitbake command with Python 3.6.5 always result in import error causing by the change of distutils module. This patch replaces the method to search executable in PATH by "/usr/bin/env <command>". (Bitbake rev: 0193e1f5b2128602ad8a80c82a3dd4d2cdb6e4a7) Signed-off-by: Tzu Hsiang Lin <t9360341@ntut.org.tw> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/clearcase.py3
-rw-r--r--bitbake/lib/bb/fetch2/npm.py1
2 files changed, 1 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/clearcase.py b/bitbake/lib/bb/fetch2/clearcase.py
index 70e280a8dd..41cd46fe25 100644
--- a/bitbake/lib/bb/fetch2/clearcase.py
+++ b/bitbake/lib/bb/fetch2/clearcase.py
@@ -70,7 +70,6 @@ from bb.fetch2 import FetchMethod
70from bb.fetch2 import FetchError 70from bb.fetch2 import FetchError
71from bb.fetch2 import runfetchcmd 71from bb.fetch2 import runfetchcmd
72from bb.fetch2 import logger 72from bb.fetch2 import logger
73from distutils import spawn
74 73
75class ClearCase(FetchMethod): 74class ClearCase(FetchMethod):
76 """Class to fetch urls via 'clearcase'""" 75 """Class to fetch urls via 'clearcase'"""
@@ -108,7 +107,7 @@ class ClearCase(FetchMethod):
108 else: 107 else:
109 ud.module = "" 108 ud.module = ""
110 109
111 ud.basecmd = d.getVar("FETCHCMD_ccrc", True) or spawn.find_executable("cleartool") or spawn.find_executable("rcleartool") 110 ud.basecmd = d.getVar("FETCHCMD_ccrc", True) or "/usr/bin/env cleartool || rcleartool"
112 111
113 if data.getVar("SRCREV", d, True) == "INVALID": 112 if data.getVar("SRCREV", d, True) == "INVALID":
114 raise FetchError("Set a valid SRCREV for the clearcase fetcher in your recipe, e.g. SRCREV = \"/main/LATEST\" or any other label of your choice.") 113 raise FetchError("Set a valid SRCREV for the clearcase fetcher in your recipe, e.g. SRCREV = \"/main/LATEST\" or any other label of your choice.")
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index 699ae72e05..7ccaba9873 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -33,7 +33,6 @@ from bb.fetch2 import runfetchcmd
33from bb.fetch2 import logger 33from bb.fetch2 import logger
34from bb.fetch2 import UnpackError 34from bb.fetch2 import UnpackError
35from bb.fetch2 import ParameterError 35from bb.fetch2 import ParameterError
36from distutils import spawn
37 36
38def subprocess_setup(): 37def subprocess_setup():
39 # Python installs a SIGPIPE handler by default. This is usually not what 38 # Python installs a SIGPIPE handler by default. This is usually not what