~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/scripts/queue.py

[r=julian-edwards][bug=800641] Ensure that the queue tool can set
        overrides on package copy jobs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
591
591
        for queue_item in self.items:
592
592
            # We delegate to the queue_item itself to override any/all
593
593
            # of its sources.
594
 
            if queue_item.contains_source:
 
594
            if queue_item.contains_source or queue_item.package_copy_job:
 
595
                if queue_item.sourcepackagerelease:
 
596
                    old_component = queue_item.sourcepackagerelease.component
 
597
                else:
 
598
                    old_component = getUtility(IComponentSet)[
 
599
                        queue_item.package_copy_job.component_name]
595
600
                queue_item.overrideSource(
596
601
                    component, section, [
597
 
                        component,
598
 
                        queue_item.sourcepackagerelease.component])
 
602
                        component, old_component])
599
603
                self.overrides_performed += 1
600
604
            self.displayInfo(queue_item)
601
605