+ # Process secret keyrings
+ if Cnf.has_key('Dinstall::SigningKeyring'):
+ process_keyring(Cnf['Dinstall::SigningKeyring'], secret=True)
+
+ if Cnf.has_key('Dinstall::SigningPubKeyring'):
+ process_keyring(Cnf['Dinstall::SigningPubKeyring'], secret=True)
+
+ # Process public keyrings
+ for keyring in session.query(Keyring).filter_by(active=True):
+ process_keyring(keyring.keyring_name)
+
+ # Process dists directories
+ # TODO: Store location of each suite in database
+ for suite in session.query(Suite):
+ suite_dir = os.path.join(suite.archive.path, 'dists', suite.suite_name, suite_suffix)
+
+ # TODO: Store valid suite/component mappings in database
+ for component in session.query(Component):
+ component_name = component.component_name
+
+ sc_dir = os.path.join(suite_dir, component_name)
+
+ do_dir(sc_dir, "%s/%s" % (suite.suite_name, component_name))
+
+ for arch in suite.architectures:
+ if arch.arch_string == 'source':
+ arch_string = 'source'
+ else:
+ arch_string = 'binary-%s' % arch.arch_string
+
+ suite_arch_dir = os.path.join(sc_dir, arch_string)
+
+ do_dir(suite_arch_dir, "%s/%s/%s" % (suite.suite_name, component_name, arch_string))