+ gzip.wait()
+
+ @classmethod
+ def write_all(class_, suite_names = [], force = False):
+ '''
+ Writes all Contents files for suites in list suite_names which defaults
+ to all 'touchable' suites if not specified explicitely. Untouchable
+ suites will be included if the force argument is set to True.
+ '''
+ session = DBConn().session()
+ suite_query = session.query(Suite)
+ if len(suite_names) > 0:
+ suite_query = suite_query.filter(Suite.suite_name.in_(suite_names))
+ if not force:
+ suite_query = suite_query.filter_by(untouchable = False)
+ pool = Pool()
+ for suite in suite_query:
+ for architecture in suite.get_architectures(skipsrc = True, skipall = True):
+ # handle 'deb' packages
+ command = ['dak', 'contents', '-s', suite.suite_name, \
+ 'generate_helper', architecture.arch_string, 'deb']
+ pool.apply_async(call, (command, ))
+ # handle 'udeb' packages for 'main' and 'non-free'
+ command = ['dak', 'contents', '-s', suite.suite_name, \
+ 'generate_helper', architecture.arch_string, 'udeb', 'main']
+ pool.apply_async(call, (command, ))
+ command = ['dak', 'contents', '-s', suite.suite_name, \
+ 'generate_helper', architecture.arch_string, 'udeb', 'non-free']
+ pool.apply_async(call, (command, ))
+ pool.close()
+ pool.join()
+ session.close()