summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-04-01 19:23:48 +0200
committerGuido Günther <agx@sigxcpu.org>2015-04-01 19:23:48 +0200
commit36b90e9f2ccbd74f05eb8e5da369259c7f9a9999 (patch)
tree5c1e2bc2040b8ef5d6be3a04688d8a0225ae6dec
parentbd72c30f029c2099ec3ed792b82eefcaedbc79b6 (diff)
SrcRpmFile: Add stderr to error messages
so we can better debug failures like http://honk.sigxcpu.org:8001/job/git-buildpackage/230/changes
-rw-r--r--gbp/rpm/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 45f83bc2..5784a7a9 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -94,9 +94,11 @@ class SrcRpmFile(object):
Unpack the source rpm to tmpdir.
Leave the cleanup to the caller in case of an error.
"""
- gbpc.RunAtCommand('rpm2cpio',
- [self.srpmfile, '|', 'cpio', '-id'],
- shell=True, capture_stderr=True)(dir=dest_dir)
+ c = gbpc.RunAtCommand('rpm2cpio',
+ [self.srpmfile, '|', 'cpio', '-id'],
+ shell=True, capture_stderr=True)
+ c.run_error = "'%s' failed: {stderr}" % (" ".join([c.cmd] + c.args))
+ c(dir=dest_dir)
class SpecFile(object):