~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/distribution.py

[r=wgrant][bug=800485] Don't make guessPublishedSourcePackageName
 join against Archive. It's slow. Reverts some of the cleanup from r13263.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1395
1395
            # effort to find a package.
1396
1396
            publishing = IStore(SourcePackagePublishingHistory).find(
1397
1397
                SourcePackagePublishingHistory,
1398
 
                SourcePackagePublishingHistory.archiveID == Archive.id,
1399
 
                Archive.distribution == self,
1400
 
                Archive.purpose.is_in(MAIN_ARCHIVE_PURPOSES),
 
1398
                SourcePackagePublishingHistory.archiveID.is_in(
 
1399
                    self.all_distro_archive_ids),
1401
1400
                SourcePackagePublishingHistory.sourcepackagereleaseID ==
1402
1401
                    SourcePackageRelease.id,
1403
1402
                SourcePackageRelease.sourcepackagename == sourcepackagename,
1428
1427
            # the sourcepackagename from that.
1429
1428
            bpph = IStore(BinaryPackagePublishingHistory).find(
1430
1429
                BinaryPackagePublishingHistory,
1431
 
                BinaryPackagePublishingHistory.archiveID == Archive.id,
1432
 
                Archive.distribution == self,
1433
 
                Archive.purpose.is_in(MAIN_ARCHIVE_PURPOSES),
 
1430
                BinaryPackagePublishingHistory.archiveID.is_in(
 
1431
                    self.all_distro_archive_ids),
1434
1432
                BinaryPackagePublishingHistory.binarypackagereleaseID ==
1435
1433
                    BinaryPackageRelease.id,
1436
1434
                BinaryPackageRelease.binarypackagename == binarypackagename,