[packages/rpm-build-tools] sort-pkgs: be more lenient about input

atler atler at pld-linux.org
Wed Jan 4 22:36:26 CET 2023


commit 258a4bea3de8b9408cdd250b916f2a4875135d75
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jan 4 21:37:32 2023 +0100

    sort-pkgs: be more lenient about input

 sort-pkgs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sort-pkgs b/sort-pkgs
index 07c1ac3..a4115db 100755
--- a/sort-pkgs
+++ b/sort-pkgs
@@ -2,7 +2,7 @@
 
 """
 This script tries to set ordering in which packages ought to be sent to builders.
-Input: file with names of packages (without the .spec suffix). One package name per line.
+Input: file with names of packages. One package name per line.
 Output: sorted packages on stdout.
 
 If the script goes in a infinite loop, that means there is a cycle or other bug.
@@ -81,7 +81,7 @@ if __name__ == "__main__":
         sys.exit(1)
     with open(sys.argv[1], 'r') as f:
         for line in f:
-            spec = line.rstrip()
+            spec = os.path.basename(os.path.normpath(line.rstrip())).removesuffix('.spec')
             parse_spec(spec)
 
     for spec in SPECS:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/1481cd8ea6ac35a07e8280abaa0a4fbe55941da9



More information about the pld-cvs-commit mailing list