Merge lp:~wgrant/launchpad/bug-661109-buildable-architectures into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 11729
Proposed branch: lp:~wgrant/launchpad/bug-661109-buildable-architectures
Merge into: lp:launchpad
Diff against target: 110 lines (+10/-10)
6 files modified
lib/lp/registry/interfaces/distroseries.py (+1/-1)
lib/lp/registry/model/distroseries.py (+1/-1)
lib/lp/soyuz/doc/distroarchseries.txt (+5/-5)
lib/lp/soyuz/model/publishing.py (+1/-1)
lib/lp/soyuz/scripts/buildd.py (+1/-1)
lib/lp/soyuz/scripts/ppa_add_missing_builds.py (+1/-1)
To merge this branch: bzr merge lp:~wgrant/launchpad/bug-661109-buildable-architectures
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+38529@code.launchpad.net

Commit message

Rename (I)DistroSeries.enabled_architectures to buildable_architectures.

Description of the change

DistroSeries.enabled_architectures has been around for a while, returning DistroArchSerieses that have chroot tarballs. But a couple of months ago the DistroArchSeries.enabled flag was introduced, making the "enabled_architectures" name rather confusing.

This branch renames (I)DistroSeries.enabled_architectures to buildable_architectures, a more sensible name that leaves enabled_architectures free for the more obvious purpose.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/interfaces/distroseries.py'
2--- lib/lp/registry/interfaces/distroseries.py 2010-09-28 18:11:41 +0000
3+++ lib/lp/registry/interfaces/distroseries.py 2010-10-15 11:03:49 +0000
4@@ -382,7 +382,7 @@
5 virtualized_architectures = Attribute(
6 "All architectures in this series where PPA is supported.")
7
8- enabled_architectures = Attribute(
9+ buildable_architectures = Attribute(
10 "All architectures in this series with available chroot tarball.")
11
12 def __getitem__(archtag):
13
14=== modified file 'lib/lp/registry/model/distroseries.py'
15--- lib/lp/registry/model/distroseries.py 2010-10-03 15:30:06 +0000
16+++ lib/lp/registry/model/distroseries.py 2010-10-15 11:03:49 +0000
17@@ -349,7 +349,7 @@
18 return None
19
20 @property
21- def enabled_architectures(self):
22+ def buildable_architectures(self):
23 store = Store.of(self)
24 origin = [
25 DistroArchSeries,
26
27=== modified file 'lib/lp/soyuz/doc/distroarchseries.txt'
28--- lib/lp/soyuz/doc/distroarchseries.txt 2010-10-06 11:46:51 +0000
29+++ lib/lp/soyuz/doc/distroarchseries.txt 2010-10-15 11:03:49 +0000
30@@ -335,7 +335,7 @@
31 The Hoary Hedgehog Release for hppa (hppa) (ppa)
32 The Hoary Hedgehog Release for i386 (x86) (official, ppa)
33
34-There is also `DistroSeries.enabled_architectures` which returns a
35+There is also `DistroSeries.buildable_architectures` which returns a
36 `ResultSet` containing only the `DistroArchSeries` with available
37 chroots tarballs (the ones for which we can build packages).
38
39@@ -343,14 +343,14 @@
40 tarballs. Once it is available the corresponding architecture is
41 returned.
42
43- >>> hoary.enabled_architectures.count()
44+ >>> hoary.buildable_architectures.count()
45 0
46
47 # Create a chroot tarball for hoary/hppa.
48 >>> chroot = factory.makeLibraryFileAlias()
49 >>> unused = hoary.getDistroArchSeries('hppa').addOrUpdateChroot(chroot)
50
51- >>> print_architectures(hoary.enabled_architectures)
52+ >>> print_architectures(hoary.buildable_architectures)
53 The Hoary Hedgehog Release for hppa (hppa) (ppa)
54
55 The architecture also has a 'chroot_url' attribute directly referencing
56@@ -367,13 +367,13 @@
57 >>> print hoary.getDistroArchSeries('i386').chroot_url
58 None
59
60-`DistroSeries.enabled_architectures` results are ordered
61+`DistroSeries.buildable_architectures` results are ordered
62 alphabetically by 'architecturetag'.
63
64 # Create a chroot tarball for hoary/i386.
65 >>> unused = hoary.getDistroArchSeries('i386').addOrUpdateChroot(chroot)
66
67- >>> print_architectures(hoary.enabled_architectures)
68+ >>> print_architectures(hoary.buildable_architectures)
69 The Hoary Hedgehog Release for hppa (hppa) (ppa)
70 The Hoary Hedgehog Release for i386 (x86) (official, ppa)
71
72
73=== modified file 'lib/lp/soyuz/model/publishing.py'
74--- lib/lp/soyuz/model/publishing.py 2010-10-14 02:28:19 +0000
75+++ lib/lp/soyuz/model/publishing.py 2010-10-15 11:03:49 +0000
76@@ -570,7 +570,7 @@
77
78 if architectures_available is None:
79 architectures_available = list(
80- self.distroseries.enabled_architectures)
81+ self.distroseries.buildable_architectures)
82
83 architectures_available = self._getAllowedArchitectures(
84 architectures_available)
85
86=== modified file 'lib/lp/soyuz/scripts/buildd.py'
87--- lib/lp/soyuz/scripts/buildd.py 2010-10-03 15:30:06 +0000
88+++ lib/lp/soyuz/scripts/buildd.py 2010-10-15 11:03:49 +0000
89@@ -130,7 +130,7 @@
90 % distroseries.name)
91 return
92
93- architectures_available = list(distroseries.enabled_architectures)
94+ architectures_available = list(distroseries.buildable_architectures)
95 if not architectures_available:
96 self.logger.debug(
97 "Chroots missing for %s, skipping" % distroseries.name)
98
99=== modified file 'lib/lp/soyuz/scripts/ppa_add_missing_builds.py'
100--- lib/lp/soyuz/scripts/ppa_add_missing_builds.py 2010-08-24 15:29:01 +0000
101+++ lib/lp/soyuz/scripts/ppa_add_missing_builds.py 2010-10-15 11:03:49 +0000
102@@ -31,7 +31,7 @@
103 % distroseries.name)
104 return
105
106- architectures_available = set(distroseries.enabled_architectures)
107+ architectures_available = set(distroseries.buildable_architectures)
108 if not architectures_available:
109 self.logger.error(
110 "Chroots missing for %s" % distroseries.name)