From: Ansgar Burchardt Date: Sat, 11 Aug 2012 11:41:52 +0000 (+0200) Subject: dak/generate_releases.py: add archive option X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=420791af0e5a8a0b1184758c20b52f18df93e91f;p=dak dak/generate_releases.py: add archive option --- diff --git a/dak/generate_releases.py b/dak/generate_releases.py index a57c5fc2..fe843efa 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -60,6 +60,7 @@ def usage (exit_code=0): print """Usage: dak generate-releases [OPTIONS] Generate the Release files + -a, --archive=ARCHIVE process suites in ARCHIVE -s, --suite=SUITE(s) process this suite Default: All suites not marked 'untouchable' -f, --force Allow processing of untouchable suites @@ -297,6 +298,7 @@ def main (): cnf["Generate-Releases::Options::%s" % (i)] = "" Arguments = [('h',"help","Generate-Releases::Options::Help"), + ('a','archive','Generate-Releases::Options::Archive','HasArg'), ('s',"suite","Generate-Releases::Options::Suite"), ('f',"force","Generate-Releases::Options::Force"), ('o','option','','ArbItem')] @@ -321,7 +323,10 @@ def main (): print "cannot find suite %s" % s Logger.log(['cannot find suite %s' % s]) else: - suites = session.query(Suite).filter(Suite.untouchable == False).all() + query = session.query(Suite).filter(Suite.untouchable == False) + if 'Archive' in Options: + query = query.join(Suite.archive).filter(Archive.archive_name==Options['Archive']) + suites = query.all() broken=[]