diff options
author | Sean Finney <seanius@debian.org> | 2008-06-09 22:02:21 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2008-06-09 22:02:21 +0200 |
commit | a17825f498f1e9604b0a496d163e041e7ef082b3 (patch) | |
tree | ed43aa9a04f95a952d52b779969e4b2bd0ad2dd2 /gen-patch-info.py | |
parent | f7dc889bb878ade9895122ec73a42cef491b9985 (diff) | |
download | patch-tracker-a17825f498f1e9604b0a496d163e041e7ef082b3.tar.gz |
add cmdline opts for selective pkg/suite processing
Diffstat (limited to 'gen-patch-info.py')
-rwxr-xr-x | gen-patch-info.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gen-patch-info.py b/gen-patch-info.py index 2c227ad..618179a 100755 --- a/gen-patch-info.py +++ b/gen-patch-info.py @@ -1,6 +1,8 @@ #!/usr/bin/python import os +import sys +import getopt import patchtracker.Conf as Conf from patchtracker.Writers import LetterTocWriter, FrontPageWriter, PackageVersWriter @@ -8,21 +10,29 @@ from patchtracker.SourceArchive import Archive, SourcePackage, SourcePackageInde if __name__ == '__main__': os.system("cheetah compile templates/skeleton") - a = Archive(Conf.archive_root) + opts,args = getopt.getopt(sys.argv[1:], "s:p:") + suites = None + packages = None + for o,v in opts: + if o == "-s": + suites = v.split(',') + elif o == "-p": + packages = v.split(',') + a = Archive(Conf.archive_root) # just for now until development stablizes #os.system("rm -rf "+Conf.output_dir) #os.mkdir(Conf.output_dir) print a master_index = SourcePackageIndex() - for s in a.suites(): + for s in a.suites(filter=suites): print "suite: ",s for c in a.components(s): print "\tcomponent:",c - for p in a.sourcepackages(s, c): + for p in a.sourcepackages(s, c, filter=packages): print "\t\tpackage:",p - #PackageVersWriter(p, s) + PackageVersWriter(p, s) master_index.ins(p,s) os.system("cp -a "+Conf.static_dir+"/* "+Conf.output_dir) |