Patchwork [Consolidated,Pull,03/45] utils.bbclass: remove the unused oe_system

login
register
mail settings
Submitter Saul Wold
Date May 25, 2012, 6:41 a.m.
Message ID <07375e616d99f1b3a2000412bc4241bb06134f16.1337927956.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/28725/
State New
Headers show

Comments

Saul Wold - May 25, 2012, 6:41 a.m.
From: Robert Yang <liezhi.yang@windriver.com>

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/utils.bbclass |   26 --------------------------
 1 files changed, 0 insertions(+), 26 deletions(-)

Patch

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index fde8f44..f8b09b4 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -58,32 +58,6 @@  def is_machine_specific(d):
             if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths):
                 return True
 
-def oe_popen_env(d):
-    env = d.getVar("__oe_popen_env", False)
-    if env is None:
-        env = {}
-        for v in d.keys():
-            if d.getVarFlag(v, "export"):
-                env[v] = d.getVar(v, True) or ""
-        d.setVar("__oe_popen_env", env)
-    return env
-
-def oe_run(d, cmd, **kwargs):
-    import oe.process
-    kwargs["env"] = oe_popen_env(d)
-    return oe.process.run(cmd, **kwargs)
-
-def oe_popen(d, cmd, **kwargs):
-    import oe.process
-    kwargs["env"] = oe_popen_env(d)
-    return oe.process.Popen(cmd, **kwargs)
-
-def oe_system(d, cmd, **kwargs):
-    """ Popen based version of os.system. """
-    if not "shell" in kwargs:
-        kwargs["shell"] = True
-    return oe_popen(d, cmd, **kwargs).wait()
-
 oe_soinstall() {
 	# Purpose: Install shared library file and
 	#          create the necessary links