X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=daklib%2Farchive.py;h=7dcc1af035c015c3d8c84a61bc518ac1980bb1d3;hb=a5346f1b1e9808e94bdb32d463b75eb2eda95414;hp=ae8516ff7250339cf9fb49adacf74b6fdb99d3cd;hpb=9b194c0a49096be2d659906c98500d2981b75b53;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index ae8516ff..7dcc1af0 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -1054,7 +1054,7 @@ class ArchiveUpload(object): remaining.append(f) continue - if rule['Source'] != control['Source'] or rule['Section'] != f.section or rule['Extension'] != ext: + if rule['Source'] != self.changes.source_name or rule['Section'] != f.section or rule['Extension'] != ext: remaining.append(f) continue @@ -1151,7 +1151,14 @@ 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 can be in the suite we install to or any suite we enhance + source_suite_ids = set([suite.suite_id, redirected_suite.suite_id]) + for enhanced_suite_id, in self.session.query(VersionCheck.reference_id) \ + .filter(VersionCheck.suite_id.in_(source_suite_ids)) \ + .filter(VersionCheck.check == 'Enhances'): + source_suite_ids.add(enhanced_suite_id) + + source_suites = self.session.query(Suite).filter(Suite.suite_id.in_(source_suite_ids)).subquery() source_component_func = lambda source: self._source_override(overridesuite, source).component binary_component_func = lambda binary: self._binary_component(overridesuite, binary)