X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_filelist.py;h=a58fe7e2c45d50288b9d135d82a716d58e319eb5;hb=b5b25234382f20595be0b8dad19f6502fb704b52;hp=1a31ed310cd0e3812f32530355c104b30087ed3f;hpb=5e0cbd293ee595359c856ea5d8b2dfc3b84f6d9b;p=dak.git diff --git a/dak/generate_filelist.py b/dak/generate_filelist.py index 1a31ed31..a58fe7e2 100755 --- a/dak/generate_filelist.py +++ b/dak/generate_filelist.py @@ -181,7 +181,7 @@ Create filename lists for apt-ftparchive. ARCH, COMPONENT and SUITE can be comma (or space) separated list, e.g. --suite=testing,unstable -Incremental mode appends only newer files to exising lists.""" +Incremental mode appends only newer files to existing lists.""" sys.exit() def main(): @@ -191,14 +191,17 @@ def main(): ('c', "component", "Filelist::Options::Component", "HasArg"), ('a', "architecture", "Filelist::Options::Architecture", "HasArg"), ('i', "incremental", "Filelist::Options::Incremental")] - query_suites = DBConn().session().query(Suite) + session = DBConn().session() + query_suites = session.query(Suite) suites = [suite.suite_name for suite in query_suites.all()] if not cnf.has_key('Filelist::Options::Suite'): cnf['Filelist::Options::Suite'] = ','.join(suites) - # we can ask the database for components if 'mixed' is gone + query_components = session.query(Component) + components = \ + [component.component_name for component in query_components.all()] if not cnf.has_key('Filelist::Options::Component'): - cnf['Filelist::Options::Component'] = 'main,contrib,non-free' - query_architectures = DBConn().session().query(Architecture) + cnf['Filelist::Options::Component'] = ','.join(components) + query_architectures = session.query(Architecture) architectures = \ [architecture.arch_string for architecture in query_architectures.all()] if not cnf.has_key('Filelist::Options::Architecture'): @@ -209,7 +212,6 @@ def main(): Options = cnf.SubTree("Filelist::Options") if Options['Help']: usage() - session = DBConn().session() suite_arch = session.query(SuiteArchitecture) threadpool = ThreadPool() for suite_name in utils.split_args(Options['Suite']):