launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23320
[Merge] lp:~cjwatson/launchpad/ds-buildable-architectures-distinct into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/ds-buildable-architectures-distinct into lp:launchpad.
Commit message:
Add missing DISTINCT to DistroSeries.buildable_architectures.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/ds-buildable-architectures-distinct/+merge/363132
PocketChroot is no longer in practice unique per DS.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/ds-buildable-architectures-distinct into lp:launchpad.
=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py 2018-05-14 09:25:45 +0000
+++ lib/lp/registry/model/distroseries.py 2019-02-13 14:56:19 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Database classes for a distribution series."""
@@ -437,7 +437,8 @@
results = store.using(*origin).find(
DistroArchSeries,
DistroArchSeries.distroseries == self)
- return results.order_by(DistroArchSeries.architecturetag)
+ return results.order_by(DistroArchSeries.architecturetag).config(
+ distinct=True)
@property
def virtualized_architectures(self):
=== modified file 'lib/lp/soyuz/doc/distroarchseries.txt'
--- lib/lp/soyuz/doc/distroarchseries.txt 2018-05-27 18:32:33 +0000
+++ lib/lp/soyuz/doc/distroarchseries.txt 2019-02-13 14:56:19 +0000
@@ -4,6 +4,7 @@
>>> from lp.testing import verifyObject
+ >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> from lp.soyuz.interfaces.distroarchseriesbinarypackage import (
... IDistroArchSeriesBinaryPackage,
... )
@@ -222,6 +223,12 @@
>>> chroot = factory.makeLibraryFileAlias()
>>> unused = hoary.getDistroArchSeries('hppa').addOrUpdateChroot(chroot)
+ # Create a chroot tarball for hoary-updates/hppa too, to make sure that
+ # this doesn't result in duplicate architectures.
+ >>> updates_chroot = factory.makeLibraryFileAlias()
+ >>> unused = hoary.getDistroArchSeries('hppa').addOrUpdateChroot(
+ ... updates_chroot, pocket=PackagePublishingPocket.UPDATES)
+
>>> print_architectures(hoary.buildable_architectures)
The Hoary Hedgehog Release for hppa (hppa) (ppa)
Follow ups