[projects/pld-ftp-admin] pfa-lintpkg: say so when rpmlint is missing

arekm arekm at pld-linux.org
Tue Oct 27 10:56:02 CET 2026


commit 753859a1b044ecf4faa75b7cd7ff114f22e344d3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Oct 24 18:32:31 2026 +0200

    pfa-lintpkg: say so when rpmlint is missing
    
    It locked the tree, collected the files and then died with a traceback
    on the first package.

 bin/pfa-lintpkg | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/bin/pfa-lintpkg b/bin/pfa-lintpkg
index 90eaabb..07eb863 100755
--- a/bin/pfa-lintpkg
+++ b/bin/pfa-lintpkg
@@ -37,6 +37,11 @@ packages = args.packages
 
 checkdir(treename)
 
+RPMLINT = '/usr/bin/rpmlint'
+if not os.access(RPMLINT, os.X_OK):
+    print(f"ERR: {RPMLINT} not found", file=sys.stderr)
+    sys.exit(1)
+
 ftpio.connect('rpmlint')
 
 if not ftpio.lock(treename, True):
@@ -76,7 +81,7 @@ class LintPkg:
         # 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
         self.lintre = re.compile(r'(?P<packages>\d+) packages and (?P<specfiles>\d+) specfiles checked; (?P<errors>\d+) errors, (?P<warnings>\d+) warnings.')
 
-        self._rpmlint = '/usr/bin/rpmlint'
+        self._rpmlint = RPMLINT
 
         # mtime, which invalidates all caches
         self.mtime = None
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/9da94db07ea316d05f5466d10ac4e10519ad6d46



More information about the pld-cvs-commit mailing list