From: Joerg Jaspert Date: Wed, 15 Aug 2012 20:27:50 +0000 (+0200) Subject: Merge remote-tracking branch 'ansgar/pu/multiarchive-1' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=cd4131cbd12f12c99005a3fdc497886cb285f907;hp=f7624a346a5430ff29425204047f45b6291b1de8;p=dak.git Merge remote-tracking branch 'ansgar/pu/multiarchive-1' into merge * ansgar/pu/multiarchive-1: daklib/archive.py: source for policy queue uploads may be in target suite Also send announcements when accepting uploads from policy queues. Signed-off-by: Joerg Jaspert --- diff --git a/dak/process_policy.py b/dak/process_policy.py index 30e10c4d..6dd1e36f 100755 --- a/dak/process_policy.py +++ b/dak/process_policy.py @@ -265,7 +265,7 @@ def get_processed_upload(upload): pu.changed_by = upload.changes.changedby pu.fingerprint = upload.changes.fingerprint - pu.suites = [] + pu.suites = [ upload.target_suite ] pu.from_policy_suites = [ upload.target_suite ] changes_path = os.path.join(upload.policy_queue.path, upload.changes.changesname) diff --git a/daklib/announce.py b/daklib/announce.py index 51a07d90..dec3e602 100644 --- a/daklib/announce.py +++ b/daklib/announce.py @@ -109,7 +109,7 @@ def announce_accept(upload): cnf = Config() subst = _subst_for_upload(upload) - accepted_to_real_suite = any(suite.policy_queue is None for suite in upload.suites) + accepted_to_real_suite = any(suite.policy_queue is None or suite in upload.from_policy_suites for suite in upload.suites) suite_names = [] for suite in upload.suites: @@ -127,9 +127,8 @@ def announce_accept(upload): # senf mail to announce lists and tracking server announce = set() for suite in upload.suites: - if suite.policy_queue is None: - continue - announce.update(suite.announce or []) + if suite.policy_queue is None or suite in upload.from_policy_suites: + announce.update(suite.announce or []) announce_list_address = ", ".join(announce) diff --git a/daklib/archive.py b/daklib/archive.py index 2badae72..bc67c2d9 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -1127,17 +1127,18 @@ class ArchiveUpload(object): if policy_queue is not None: redirected_suite = policy_queue.suite + source_suites = self.session.query(Suite).filter(Suite.suite_id.in_([suite.suite_id, redirected_suite.suite_id])).subquery() + source_component_func = lambda source: self._source_override(overridesuite, source).component binary_component_func = lambda binary: self._binary_component(overridesuite, binary) - (db_source, db_binaries) = self._install_to_suite(redirected_suite, source_component_func, binary_component_func, extra_source_archives=[suite.archive]) + (db_source, db_binaries) = self._install_to_suite(redirected_suite, source_component_func, binary_component_func, source_suites=source_suites, extra_source_archives=[suite.archive]) if policy_queue is not None: self._install_policy(policy_queue, suite, db_changes, db_source, db_binaries) # copy to build queues if policy_queue is None or policy_queue.send_to_build_queues: - source_suites = self.session.query(Suite).filter_by(suite_id=suite.suite_id).subquery() for build_queue in suite.copy_queues: self._install_to_suite(build_queue.suite, source_component_func, binary_component_func, source_suites=source_suites, extra_source_archives=[suite.archive])