summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/clearcase.py
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/lib/bb/fetch2/clearcase.py
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/lib/bb/fetch2/clearcase.py')
-rw-r--r--bitbake/lib/bb/fetch2/clearcase.py3
1 files changed, 1 insertions, 2 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.")