]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
sort-pkgs: be more lenient about input
authorJan Palus <atler@pld-linux.org>
Wed, 4 Jan 2023 20:37:32 +0000 (21:37 +0100)
committerJan Palus <atler@pld-linux.org>
Wed, 4 Jan 2023 20:37:32 +0000 (21:37 +0100)
sort-pkgs

index 07c1ac340566dce23eb466862a9442f5384c9e82..a4115db946cf5ada0c0d7c931f8acbbe396c8e3b 100755 (executable)
--- 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:
This page took 0.077807 seconds and 4 git commands to generate.