Options = cnf.SubTree("Filelist::Options")
if Options['Help']:
usage()
- suite_arch = session.query(SuiteArchitecture)
threadpool = ThreadPool()
for suite_name in utils.split_args(Options['Suite']):
suite = query_suites.filter_by(suite_name = suite_name).one()
- join = suite_arch.filter_by(suite_id = suite.suite_id)
for component_name in utils.split_args(Options['Component']):
component = session.query(Component).\
filter_by(component_name = component_name).one()
- for architecture_name in utils.split_args(Options['Architecture']):
+ for arch_string in utils.split_args(Options['Architecture']):
architecture = query_architectures.\
- filter_by(arch_string = architecture_name).one()
- try:
- join.filter_by(arch_id = architecture.arch_id).one()
- if architecture_name == 'source':
- threadpool.queueTask(writeSourceList,
- (suite, component, Options['Incremental']))
- elif architecture_name != 'all':
- threadpool.queueTask(writeBinaryList,
- (suite, component, architecture, 'deb',
- Options['Incremental']))
- threadpool.queueTask(writeBinaryList,
- (suite, component, architecture, 'udeb',
- Options['Incremental']))
- except:
+ filter_by(arch_string = arch_string).one()
+ if architecture not in suite.architectures:
pass
+ elif arch_string == 'source':
+ threadpool.queueTask(writeSourceList,
+ (suite, component, Options['Incremental']))
+ elif arch_string != 'all':
+ threadpool.queueTask(writeBinaryList,
+ (suite, component, architecture, 'deb',
+ Options['Incremental']))
+ threadpool.queueTask(writeBinaryList,
+ (suite, component, architecture, 'udeb',
+ Options['Incremental']))
threadpool.joinAll()
# this script doesn't change the database
session.close()
################################################################################
-# TODO: remove SuiteArchitecture class
-class SuiteArchitecture(object):
- def __init__(self, *args, **kwargs):
- pass
-
- def __repr__(self):
- return '<SuiteArchitecture (%s, %s)>' % (self.suite_id, self.arch_id)
-
-__all__.append('SuiteArchitecture')
-
# TODO: should be removed because the implementation is too trivial
@session_wrapper
def get_suite_architectures(suite, skipsrc=False, skipall=False, session=None):
policy_queue = relation(PolicyQueue),
copy_queues = relation(BuildQueue, secondary=self.tbl_suite_build_queue_copy)))
- mapper(SuiteArchitecture, self.tbl_suite_architectures,
- properties = dict(suite_id = self.tbl_suite_architectures.c.suite,
- suite = relation(Suite, backref='suitearchitectures'),
- arch_id = self.tbl_suite_architectures.c.architecture,
- architecture = relation(Architecture)))
-
mapper(SuiteSrcFormat, self.tbl_suite_src_formats,
properties = dict(suite_id = self.tbl_suite_src_formats.c.suite,
suite = relation(Suite, backref='suitesrcformats'),