[projects/pld-builder.new] rpm_builder: name the failed rpm section when some rpms were written

arekm arekm at pld-linux.org
Thu Nov 12 00:30:06 CET 2026


commit a8e3b1d5b2094b9097bb929815e841362802453a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Nov 11 23:12:18 2026 +0100

    rpm_builder: name the failed rpm section when some rpms were written
    
    A failed rpmbuild was reported as FAIL_<SECTION>, by the last section
    in its log, only when it wrote no rpm at all; one that failed after
    writing some was a bare FAIL. The section is now looked up for every
    failed rpmbuild.

 PLD_Builder/rpm_builder.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/PLD_Builder/rpm_builder.py b/PLD_Builder/rpm_builder.py
index c053850..0a2a53d 100644
--- a/PLD_Builder/rpm_builder.py
+++ b/PLD_Builder/rpm_builder.py
@@ -251,13 +251,13 @@ def build_rpm(r, b):
                 res = chroot.run(cmd, logfile = b.logfile)
                 end_time = time.time()
                 b.log_line(f"ended at: {time.asctime()}, done in {datetime.timedelta(0, end_time - begin_time)}")
-                if res:
-                    res = "FAIL"
                 files = util.collect_files(b.logfile, basedir = b.get_topdir())
                 if len(files) > 0:
                     r.chroot_files.extend(files)
                 else:
                     b.log_line("error: No files produced.")
+                if res or not files:
+                    # the status names the rpm section the build stopped in
                     last_section = util.find_last_section(b.logfile)
                     if last_section == None:
                         res = "FAIL"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/2cf988b75f72cba070da99d03d3c3e709f5166bc



More information about the pld-cvs-commit mailing list