diff options
Diffstat (limited to 'patchtracker/SourceArchive.py')
-rwxr-xr-x | patchtracker/SourceArchive.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/patchtracker/SourceArchive.py b/patchtracker/SourceArchive.py index ce3459a..303bcdd 100755 --- a/patchtracker/SourceArchive.py +++ b/patchtracker/SourceArchive.py @@ -4,6 +4,7 @@ from fnmatch import fnmatch from gzip import GzipFile from debian_bundle import deb822 import difflib +from patchtracker import Conf import models @@ -30,6 +31,8 @@ class Archive: def parsesuites(self, filter=None): slist = os.listdir(self.distsdir) + if Conf.suites: + slist = set(Conf.suites).intersection(set(slist)) if filter: slist = set(filter).intersection(set(slist)) for s in sorted(slist): @@ -151,9 +154,11 @@ class ReleaseList: def __init__(self, project): self.project = project - # XXX this is hard coded for now... self.relorder = {} - self.relorder["debian"] = ["etch", "lenny", "squeeze", "sid", "experimental"] + if Conf.suites: + self.relorder["debian"] = Conf.suites + else: + self.relorder["debian"] = ["lenny", "squeeze", "wheezy", "sid", "experimental"] def __iter__(self): for r in self.relorder[self.project]: @@ -164,17 +169,17 @@ if __name__ == "__main__": import Conf import sys import copy - a = Archive(sys.argv[1], suitefilter=["etch"]) + a = Archive(sys.argv[1], suitefilter=["lenny"]) b = copy.deepcopy(a) b.addsuite("lenny") - b.addcomponent("etch", "something") + b.addcomponent("lenny", "something") class x: def __init__(self,name): self.name=name - b.addsourcepackage("etch","main",x("foo")) + b.addsourcepackage("lenny","main",x("foo")) print "suite diff" print "\n".join( ArchiveDiffer().diffsuites(a,b) ) print "component diff" - print "\n".join( ArchiveDiffer().diffcomponents(a,b,"etch") ) + print "\n".join( ArchiveDiffer().diffcomponents(a,b,"lenny") ) print "package diff" - print "\n".join( ArchiveDiffer().diffsourcepackages(a,b,"etch","main") ) + print "\n".join( ArchiveDiffer().diffsourcepackages(a,b,"lenny","main") ) |