diff options
author | Tzu Hsiang Lin <t9360341@ntut.org.tw> | 2018-05-22 01:56:44 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-02 11:44:00 +0100 |
commit | 63a68b093e865dd2f39d3f798a246aef400d9d63 (patch) | |
tree | 49cde82bc5f0390bb70f7f73deeda3d5f2f1ecaa /bitbake/lib/bb/fetch2 | |
parent | f4372765f3fdae26a8e666548fba3e55f5b837c0 (diff) | |
download | poky-63a68b093e865dd2f39d3f798a246aef400d9d63.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: e4fcf4d9cef6816afac9eebb8d57c82cd1ceb293)
Signed-off-by: Tzu Hsiang Lin <t9360341@ntut.org.tw>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/clearcase.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch2/npm.py | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/clearcase.py b/bitbake/lib/bb/fetch2/clearcase.py index 36beab6a5b..3a6573d0b2 100644 --- a/bitbake/lib/bb/fetch2/clearcase.py +++ b/bitbake/lib/bb/fetch2/clearcase.py | |||
@@ -69,7 +69,6 @@ from bb.fetch2 import FetchMethod | |||
69 | from bb.fetch2 import FetchError | 69 | from bb.fetch2 import FetchError |
70 | from bb.fetch2 import runfetchcmd | 70 | from bb.fetch2 import runfetchcmd |
71 | from bb.fetch2 import logger | 71 | from bb.fetch2 import logger |
72 | from distutils import spawn | ||
73 | 72 | ||
74 | class ClearCase(FetchMethod): | 73 | class ClearCase(FetchMethod): |
75 | """Class to fetch urls via 'clearcase'""" | 74 | """Class to fetch urls via 'clearcase'""" |
@@ -107,7 +106,7 @@ class ClearCase(FetchMethod): | |||
107 | else: | 106 | else: |
108 | ud.module = "" | 107 | ud.module = "" |
109 | 108 | ||
110 | ud.basecmd = d.getVar("FETCHCMD_ccrc") or spawn.find_executable("cleartool") or spawn.find_executable("rcleartool") | 109 | ud.basecmd = d.getVar("FETCHCMD_ccrc") or "/usr/bin/env cleartool || rcleartool" |
111 | 110 | ||
112 | if d.getVar("SRCREV") == "INVALID": | 111 | if d.getVar("SRCREV") == "INVALID": |
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.") | 112 | 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 b5f148ca03..ccc287b164 100644 --- a/bitbake/lib/bb/fetch2/npm.py +++ b/bitbake/lib/bb/fetch2/npm.py | |||
@@ -32,7 +32,6 @@ from bb.fetch2 import runfetchcmd | |||
32 | from bb.fetch2 import logger | 32 | from bb.fetch2 import logger |
33 | from bb.fetch2 import UnpackError | 33 | from bb.fetch2 import UnpackError |
34 | from bb.fetch2 import ParameterError | 34 | from bb.fetch2 import ParameterError |
35 | from distutils import spawn | ||
36 | 35 | ||
37 | def subprocess_setup(): | 36 | def subprocess_setup(): |
38 | # Python installs a SIGPIPE handler by default. This is usually not what | 37 | # Python installs a SIGPIPE handler by default. This is usually not what |