提交 e2bad9d2 编写于 作者: A Ansgar Burchardt

dak/generate_packages_sources2.py: add archive option

上级 4c6211d2
...@@ -34,6 +34,7 @@ def usage(): ...@@ -34,6 +34,7 @@ def usage():
print """Usage: dak generate-packages-sources2 [OPTIONS] print """Usage: dak generate-packages-sources2 [OPTIONS]
Generate the Packages/Sources files Generate the Packages/Sources files
-a, --archive=ARCHIVE process suites in ARCHIVE
-s, --suite=SUITE process this suite -s, --suite=SUITE process this suite
Default: All suites not marked 'untouchable' Default: All suites not marked 'untouchable'
-f, --force Allow processing of untouchable suites -f, --force Allow processing of untouchable suites
...@@ -311,6 +312,7 @@ def main(): ...@@ -311,6 +312,7 @@ def main():
cnf = Config() cnf = Config()
Arguments = [('h',"help","Generate-Packages-Sources::Options::Help"), Arguments = [('h',"help","Generate-Packages-Sources::Options::Help"),
('a','archive','Generate-Packages-Sources::Options::Archive','HasArg'),
('s',"suite","Generate-Packages-Sources::Options::Suite"), ('s',"suite","Generate-Packages-Sources::Options::Suite"),
('f',"force","Generate-Packages-Sources::Options::Force"), ('f',"force","Generate-Packages-Sources::Options::Force"),
('o','option','','ArbItem')] ('o','option','','ArbItem')]
...@@ -344,7 +346,10 @@ def main(): ...@@ -344,7 +346,10 @@ def main():
print "I: Cannot find suite %s" % s print "I: Cannot find suite %s" % s
logger.log(['Cannot find suite %s' % s]) logger.log(['Cannot find suite %s' % s])
else: else:
suites = session.query(Suite).filter(Suite.untouchable == False).all() query = session.query(Suite).filter(Suite.untouchable == False).all()
if 'Archive' in Options:
query = query.join(Suite.archive).filter(Archive.archive_name==Options['Archive'])
suites = query.all()
force = Options.has_key("Force") and Options["Force"] force = Options.has_key("Force") and Options["Force"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册