diff options
author | Sean Finney <seanius@debian.org> | 2011-02-20 23:00:31 +0100 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2011-02-20 23:00:31 +0100 |
commit | 0e6d288bf4c21b043a02c6cc19367bb937397edd (patch) | |
tree | 2ade9f16c385837df3f486ce818213a049a008fe | |
parent | 6bd03818dae68c8f2ec32159d21a02fa5b4f25fd (diff) | |
download | patch-tracker-0e6d288bf4c21b043a02c6cc19367bb937397edd.tar.gz |
First stab at extracting suites into a local conf value
-rwxr-xr-x | patchtracker/Conf.py | 6 | ||||
-rwxr-xr-x | patchtracker/SourceArchive.py | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/patchtracker/Conf.py b/patchtracker/Conf.py index e89a129..28820b5 100755 --- a/patchtracker/Conf.py +++ b/patchtracker/Conf.py @@ -38,6 +38,12 @@ archive_lists_compressed = False indication flag for the scripts that interact with it. """ +suites = None +""" Override the suites that should be tracked in the application. Should + be a chronologically ordered list and should correspond to the + seperately managed reprepro configuration. +""" + try: from localconfig import * except ImportError: diff --git a/patchtracker/SourceArchive.py b/patchtracker/SourceArchive.py index 9f30c58..b99e3a4 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 class Archive: def __init__(self, dir, suitefilter=None, pkgfilter=None): @@ -28,6 +29,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): @@ -172,9 +175,11 @@ class ReleaseList: def __init__(self, project): self.project = project - # XXX this is hard coded for now... self.relorder = {} - self.relorder["debian"] = ["lenny", "squeeze", "wheezy", "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]: |