X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_suite.py;h=6043dd2ccb9403b148ca6b3f73035c0dfce0a890;hb=245c6549dbacaeab5ee36ec74372b1df8675b477;hp=f609ac225fde4f3d55ef599e51c6754011238bfc;hpb=bd2543470b8dfbc1686dc861e91936ad6548a910;p=dak.git diff --git a/dak/update_suite.py b/dak/update_suite.py index f609ac22..6043dd2c 100644 --- a/dak/update_suite.py +++ b/dak/update_suite.py @@ -70,7 +70,7 @@ class SuiteUpdater(object): if obey_policy_queue and target.policy_queue_id is not None: raise Exception('Not implemented...') - self.logger = None if dry_run else daklog.Logger("update-suite") + self.logger = None if dry_run else daklib.daklog.Logger("update-suite") def query_new_binaries(self, additional_sources): # Candidates are binaries in the origin suite, and optionally in its policy queue. @@ -187,6 +187,8 @@ class SuiteUpdater(object): .filter(ArchiveFile.archive_id == suite.archive_id) def install_binaries(self, binaries, suite): + if len(binaries) == 0: + return # If origin and target suites are in the same archive, we can skip the # overhead from ArchiveTransaction.copy_binary() if self.origin.archive_id == suite.archive_id: @@ -207,6 +209,8 @@ class SuiteUpdater(object): .filter(ArchiveFile.archive_id == suite.archive_id) def install_sources(self, sources, suite): + if len(sources) == 0: + return # If origin and target suites are in the same archive, we can skip the # overhead from ArchiveTransaction.copy_source() if self.origin.archive_id == suite.archive_id: @@ -222,7 +226,7 @@ class SuiteUpdater(object): def update_suite(self): targets = set([self.target]) if self.obey_build_queues: - targets.update(self.target.copy_queues) + targets.update([bq.suite for bq in self.target.copy_queues]) target_names = [ s.suite_name for s in targets ] target_names.sort() target_name = ",".join(target_names)