Code review comment for lp:~rvb/launchpad/dds-fix-localpackagediffs-745776

Revision history for this message
Julian Edwards (julian-edwards) wrote :

6 + def _package_url(self, distro_series, version):
57 + pubs = distro_series.getPublishedSources(
58 + self.context.source_package_name, include_pending=True,
59 + version=version)

This is going to break for 2 reasons:

 1. include_pending=True will make it potentially return more than one version
 2. the archive is not specified so it'll pick up publications from PPAs

I want to deprecate IDistroSeries.getPublishedSources(), it's a little evil. Let's use IArchive.getPublishedSources() instead, you can do the exact same thing by copying this code:

pubs = distro_series.main_archive.getPublishedSources(
    name=self.context.source_package_name,
    version=version,
    status=PackagePublishingStatus.PUBLISHED,
    exact_match=True)

and profit!

review: Needs Fixing

« Back to merge proposal