X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Finit_dirs.py;h=347945a3e8c037ac6a0d428b5a798592e8e69a7b;hb=fdbef587c29814f97c192de5a8b7e9f09cc45fa4;hp=32c8f589b4e8e24c37741ce3716f2fe0badd5685;hpb=53fc7eab5ce89173e70a2889ed161e1cafc70c28;p=dak.git diff --git a/dak/init_dirs.py b/dak/init_dirs.py index 32c8f589..347945a3 100755 --- a/dak/init_dirs.py +++ b/dak/init_dirs.py @@ -103,16 +103,23 @@ def process_keyring(fullpath, secret=False): ###################################################################### def create_directories(): - """Create directories referenced in dak.conf and apt.conf.""" + """Create directories referenced in dak.conf.""" session = DBConn().session() # Process directories from dak.conf process_tree(Cnf, "Dir") + # Hardcode creation of the unchecked directory + if Cnf.has_key("Dir::Base"): + do_dir(os.path.join(Cnf["Dir::Base"], "queue", "unchecked"), 'unchecked directory') + # Process queue directories for queue in session.query(PolicyQueue): do_dir(queue.path, '%s queue' % queue.queue_name) + # If we're doing the NEW queue, make sure it has a COMMENTS directory + if queue.queue_name == 'new': + do_dir(os.path.join(queue.path, "COMMENTS"), '%s queue comments' % queue.queue_name) for config_name in [ "Rm::LogFile", "Import-Archive::ExportDir" ]: @@ -131,13 +138,13 @@ def create_directories(): process_keyring(Cnf['Dinstall::SigningPubKeyring'], secret=True) # Process public keyrings - for keyring in session.query(Keyring).all(): + 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( Cnf['Dir::Root'], 'dists', "%s/%s" % (suite.suite_name, suite_suffix) ) + 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):