summaryrefslogtreecommitdiff
path: root/gbp/rpm/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/rpm/__init__.py')
-rw-r--r--gbp/rpm/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 2290bc32..e62ae2d2 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -35,7 +35,7 @@ import gbp.log
from gbp.pkg import (UpstreamSource, compressor_opts, parse_archive_filename)
from gbp.rpm.policy import RpmPkgPolicy
from gbp.rpm.linkedlist import LinkedList
-from gbp.rpm.lib_rpm import librpm
+from gbp.rpm.lib_rpm import librpm, get_librpm_log
class NoSpecError(Exception):
@@ -181,8 +181,11 @@ class SpecFile(object):
librpm.spec(filtered.name)
return librpm.spec(filtered.name)
except ValueError as err:
- raise GbpError("RPM error while parsing %s: %s" %
- (self.specfile, err))
+ rpmlog = get_librpm_log()
+ gbp.log.debug("librpm log:\n %s" %
+ "\n ".join(rpmlog))
+ raise GbpError("RPM error while parsing %s: %s (%s)" %
+ (self.specfile, err, rpmlog[-1]))
@property
def version(self):