[projects/pld-ftp-admin] pfa-from-incoming: drop the NVR check disabled since 2014

arekm arekm at pld-linux.org
Thu Oct 29 09:17:46 CET 2026


commit c4b69a3d04ef949089b6d7b0b565b7098aa1680c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Oct 28 23:34:28 2026 +0100

    pfa-from-incoming: drop the NVR check disabled since 2014
    
    The check mailed the requester when a binary rpm's version or release
    differed from its src.rpm's. Its call was commented out in 2014 as too
    much noise for too little use, which left send_vr_msg() with no caller
    and the src.rpm NVR parsed for every upload for nothing.

 bin/pfa-from-incoming | 44 --------------------------------------------
 1 file changed, 44 deletions(-)
---
diff --git a/bin/pfa-from-incoming b/bin/pfa-from-incoming
index 58e8418..98aa110 100755
--- a/bin/pfa-from-incoming
+++ b/bin/pfa-from-incoming
@@ -3,7 +3,6 @@
 
 import argparse
 import os
-import re
 import sys
 
 argparse.ArgumentParser(
@@ -117,41 +116,6 @@ def move_noarch(f, arch, rpmfile, dstpkg):
             f.write(f"file:noarch:{rpmfile}\ninfo:noarch_arch:{rpmfile}:{arch}\n")
         mv(incoming_dir + arch + '/' + rpmfile, default_to + 'noarch/RPMS')
 
-def send_vr_msg(snvr, anvr, pkg, arch):
-    req_email=pkg.build[pkg.lastbid].requester_email
-    req_bid=pkg.lastbid
-    cc_list=[]
-    if 'logs_list' in cval:
-        cc_list.append(cval['logs_list'])
-    m_subject=f"NVR error: {snvr[0]} version or release differ among subpackages"
-    bids=pkg.build.keys()
-    if len(bids)>1:
-        for bid in bids:
-            newcc=pkg.build[bid].requester_email
-            if req_email!=newcc and newcc not in cc_list:
-                cc_list.append(newcc)
-
-    msg=f"From: {cval['from_field']}\nTo: {req_email}\n"
-    if cc_list:
-        msg=msg+f"Cc: {', '.join(cc_list)}\n"
-    msg=msg+"""X-PLD-Builder: {}
-References: <{}@pld.src.builder>
-In-Reply-To: <{}@pld.src.builder>
-Subject: {}
-
-""".format(cval['xpldbuilder'], req_bid, req_bid, m_subject)
-
-    sm = os.popen("/usr/sbin/sendmail -t", "w")
-
-    sm.write(msg)
-
-    sm.write(f"Difference between {snvr[0]} SRPM (currently in {ftptree!r}) and {arch} RPM NVR:\n\n"),
-    sm.write("Expected ({}):\nV: {}\nR: {}\n\n".format(*snvr))
-    sm.write("RPM:\nN: {}\nV: {}\nR: {}\n".format(*anvr))
-    sm.write('\n')
-
-    sm.close()
-
 # main()
 try:
     ftpio.connect(f'from-incoming-pid-{os.getpid()}')
@@ -207,9 +171,6 @@ try:
             if not ftptree.has_key(repr(srcpkg)):
                 continue # We require the src.rpm to be present
 
-            renvr = re.compile(r'(.*)-(.*)-(.*)\.[^.]*\.rpm')
-            srcnvr = renvr.match(srpm).groups()
-
             rpmfile_missing = [f for f in srcpkg.files['ARCH'] if not os.path.exists(incoming_dir + arch + '/'+f)]
             if len(rpmfile_missing):
                 for filem in rpmfile_missing:
@@ -236,11 +197,6 @@ try:
                 for rpmfile in srcpkg.files['ARCH']:
                     moved_anything = True
 
-    # Too much noise, too little use
-    #            archnvr = renvr.match(rpmfile).groups()
-    #            if srcnvr[1] != archnvr[1] or srcnvr[2] != archnvr[2]:
-    #                send_vr_msg(srcnvr, archnvr, dstpkg, arch)
-
                     if rpmfile[-11:] == '.noarch.rpm' and config.separate_noarch:
                         move_noarch(f, arch, rpmfile, dstpkg)
                     else:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/16c6c5f2d4269aef64813afc632c36b5ce242afa



More information about the pld-cvs-commit mailing list