[projects/pld-builder.new] rpm_builder: send no rpms of a failed build

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


commit 71060b90da263d1d97c874c38db4eac75859bd08
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Nov 11 23:14:07 2026 +0100

    rpm_builder: send no rpms of a failed build
    
    When rpmbuild failed after writing some of the rpms, those were still
    sent to ftp with an .uploadinfo, copied to the rpm cache and, with the
    upgrade flag, installed in the chroot, while the batch was reported as
    failed. A failed build now sends and keeps nothing.

 PLD_Builder/rpm_builder.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/PLD_Builder/rpm_builder.py b/PLD_Builder/rpm_builder.py
index 0a2a53d..b1cef87 100644
--- a/PLD_Builder/rpm_builder.py
+++ b/PLD_Builder/rpm_builder.py
@@ -263,7 +263,8 @@ def build_rpm(r, b):
                         res = "FAIL"
                     else:
                         res = f"FAIL_{last_section.upper()}"
-                b.files = files
+                # the rpms a failed build managed to write stay in the chroot: they are removed with the rest
+                b.files = [] if res else files
 
     # cleanup tmp and build files
     chroot.run("""
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list