From: Ansgar Burchardt Date: Wed, 15 Aug 2012 20:22:22 +0000 (+0200) Subject: daklib/archive.py: source for policy queue uploads may be in target suite X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b4992d01d1885b8418253930424afca014c2e5a;p=dak daklib/archive.py: source for policy queue uploads may be in target suite Note that this patch breaks binNMUs to suites where the source is only available in a enhanced suite. --- 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])