Blob Blame History Raw
From 166aaedb9fc92590f5e9364c1cb6f607eaf28876 Mon Sep 17 00:00:00 2001
From: Ondrej Nosek <onosek@redhat.com>
Date: Mon, 6 Sep 2021 18:18:17 +0200
Subject: [PATCH 1/3] Print SpecFile parsing debug info

The recently added class SpecFile parses a specfile with tool rpmspec.
It provides error messages when parsing failed. This change will show
these messages to user. Without this rhpkg only fails with exception
and simple message.

Resolves: rhbz#2000556

Signed-off-by: Ondrej Nosek <onosek@redhat.com>
---
 pyrpkg/spec.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pyrpkg/spec.py b/pyrpkg/spec.py
index 6341fcd..a276120 100644
--- a/pyrpkg/spec.py
+++ b/pyrpkg/spec.py
@@ -49,6 +49,7 @@ def run(spec, sourcedir):
 
     retcode = process.poll()
     if retcode:
+        print(stderr.decode('utf-8'))
         raise rpkgError('Error running rpmspec on "%s", return code %s'
                         % (spec, retcode))
 
-- 
2.31.1