From: Torsten Werner Date: Sun, 16 Jan 2011 20:47:00 +0000 (+0100) Subject: Remove class SuiteAchitecture completely. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=66fa53ec4bc5b812493197f55940c60280db364f;p=dak.git Remove class SuiteAchitecture completely. Signed-off-by: Torsten Werner --- diff --git a/dak/generate_filelist.py b/dak/generate_filelist.py index a4aba326..d90338a5 100755 --- a/dak/generate_filelist.py +++ b/dak/generate_filelist.py @@ -212,31 +212,27 @@ def main(): 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() diff --git a/daklib/dbconn.py b/daklib/dbconn.py index d66a64cf..227a8af1 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2578,16 +2578,6 @@ __all__.append('get_suite') ################################################################################ -# TODO: remove SuiteArchitecture class -class SuiteArchitecture(object): - def __init__(self, *args, **kwargs): - pass - - def __repr__(self): - return '' % (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): @@ -3097,12 +3087,6 @@ class DBConn(object): 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'),