aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oe
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-10-13 17:16:43 -0700
committerChris Larson <chris_larson@mentor.com>2010-10-13 17:21:07 -0700
commit9db97990101012f3d8d5a875ea8f24c1d2017d38 (patch)
treeeea02a85f9b640475e60a620ab42e4244e5a35c3 /lib/oe
parenta016eb41a3714ca781ddb21ba351a8b872034f18 (diff)
downloadopenembedded-9db97990101012f3d8d5a875ea8f24c1d2017d38.tar.gz
openembedded-9db97990101012f3d8d5a875ea8f24c1d2017d38.tar.bz2
openembedded-9db97990101012f3d8d5a875ea8f24c1d2017d38.zip
oe.unpack: use oe.process
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/oe')
-rw-r--r--lib/oe/unpack.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/oe/unpack.py b/lib/oe/unpack.py
index 6d24c5e2fa..f2139baa99 100644
--- a/lib/oe/unpack.py
+++ b/lib/oe/unpack.py
@@ -9,7 +9,7 @@ class UnpackError(Exception):
self.output = output
def __str__(self):
- return "Unable to unpack '%s' to '%s' (cmd: %s): %s" % \
+ return "Unable to unpack '%s' to '%s' (cmd: %s):\n%s" % \
(self.filename, self.destdir, self.command, self.output)
def to_boolean(string, default=None):
@@ -87,9 +87,8 @@ def unpack_file(file, destdir, dos=False, env=None):
if not cmd:
return
- pipe = subprocess.Popen(cmd, preexec_fn=subprocess_setup, shell=True,
- cwd=destdir, env=env, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- stdout = pipe.communicate()[0]
- if pipe.returncode != 0:
- raise UnpackError(file, destdir, cmd, stdout)
+ import oe.process
+ try:
+ oe.process.run(cmd, env=env)
+ except oe.process.CmdError, exc:
+ raise UnpackError(file, destdir, cmd, str(exc))