diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-05-24 16:03:26 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-25 11:17:53 +0100 |
commit | 70caf1e1bcb329404da2a858f777332a7c99c9b9 (patch) | |
tree | f47e5eea1be8e4c559840588dc4f2f114a256b34 /meta | |
parent | bbd07d10e22cf3afa41a5f5eeef9fc50c8d96960 (diff) | |
download | poky-70caf1e1bcb329404da2a858f777332a7c99c9b9.tar.gz |
utils.bbclass: remove the unused oe_system
The following functions in meta/classes/utils.bbclass were not
used by anyone, and they didn't work when I tried to use them:
def oe_popen_env(d):
def oe_run(d, cmd, **kwargs):
def oe_popen(d, cmd, **kwargs):
def oe_system(d, cmd, **kwargs):
There error was:
AttributeError: type object 'str' has no attribute 'getVar'
We have bitbake/lib/bb/process.py to instead, so remove them.
[YOCTO #2489]
(From OE-Core rev: 15ad62ab1be060d8a7cdc2d28167ea3af4cfd5d5)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/utils.bbclass | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index fde8f446ad..f8b09b423c 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass | |||
@@ -58,32 +58,6 @@ def is_machine_specific(d): | |||
58 | if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths): | 58 | if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths): |
59 | return True | 59 | return True |
60 | 60 | ||
61 | def oe_popen_env(d): | ||
62 | env = d.getVar("__oe_popen_env", False) | ||
63 | if env is None: | ||
64 | env = {} | ||
65 | for v in d.keys(): | ||
66 | if d.getVarFlag(v, "export"): | ||
67 | env[v] = d.getVar(v, True) or "" | ||
68 | d.setVar("__oe_popen_env", env) | ||
69 | return env | ||
70 | |||
71 | def oe_run(d, cmd, **kwargs): | ||
72 | import oe.process | ||
73 | kwargs["env"] = oe_popen_env(d) | ||
74 | return oe.process.run(cmd, **kwargs) | ||
75 | |||
76 | def oe_popen(d, cmd, **kwargs): | ||
77 | import oe.process | ||
78 | kwargs["env"] = oe_popen_env(d) | ||
79 | return oe.process.Popen(cmd, **kwargs) | ||
80 | |||
81 | def oe_system(d, cmd, **kwargs): | ||
82 | """ Popen based version of os.system. """ | ||
83 | if not "shell" in kwargs: | ||
84 | kwargs["shell"] = True | ||
85 | return oe_popen(d, cmd, **kwargs).wait() | ||
86 | |||
87 | oe_soinstall() { | 61 | oe_soinstall() { |
88 | # Purpose: Install shared library file and | 62 | # Purpose: Install shared library file and |
89 | # create the necessary links | 63 | # create the necessary links |