Merge lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor4 into lp:launchpad
- ppa-privatisation-test-refactor4
- Merge into devel
Proposed by
Michael Nelson
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor4 | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor3 | ||||
Diff against target: |
891 lines (+159/-151) 8 files modified
lib/lp/soyuz/doc/archiveauthtoken.txt (+25/-25) lib/lp/soyuz/doc/archivesubscriber.txt (+37/-34) lib/lp/soyuz/doc/build.txt (+42/-50) lib/lp/soyuz/doc/package-diff.txt (+5/-4) lib/lp/soyuz/doc/sourcepackagerelease.txt (+3/-3) lib/lp/soyuz/stories/ppa/xx-ppa-files.txt (+41/-30) lib/lp/soyuz/tests/test_publishing.py (+3/-3) lib/lp/testing/factory.py (+3/-2) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor4 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+19961@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote : | # |
Revision history for this message
Graham Binns (gmb) : | # |
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/soyuz/doc/archiveauthtoken.txt' | |||
2 | --- lib/lp/soyuz/doc/archiveauthtoken.txt 2009-05-06 20:53:05 +0000 | |||
3 | +++ lib/lp/soyuz/doc/archiveauthtoken.txt 2010-02-26 15:38:20 +0000 | |||
4 | @@ -7,13 +7,12 @@ | |||
5 | 7 | 7 | ||
6 | 8 | See also ArchiveSubscriber.txt. | 8 | See also ArchiveSubscriber.txt. |
7 | 9 | 9 | ||
9 | 10 | Set cprov's PPA to be a private one: | 10 | First we create a private PPA for Joe. |
10 | 11 | 11 | ||
16 | 12 | >>> login("foo.bar@canonical.com") | 12 | >>> login("admin@canonical.com") |
17 | 13 | >>> from lp.registry.interfaces.person import IPersonSet | 13 | >>> joe = factory.makePerson(name="joe", displayname="Joe Smith") |
18 | 14 | >>> cprov = getUtility(IPersonSet).getByName("cprov") | 14 | >>> joe_private_ppa = factory.makeArchive( |
19 | 15 | >>> cprov.archive.buildd_secret = "secret" | 15 | ... owner=joe, private=True) |
15 | 16 | >>> cprov.archive.private = True | ||
20 | 17 | >>> logout() | 16 | >>> logout() |
21 | 18 | 17 | ||
22 | 19 | == Creating new tokens == | 18 | == Creating new tokens == |
23 | @@ -26,23 +25,24 @@ | |||
24 | 26 | though we do not yet have a subscription: | 25 | though we do not yet have a subscription: |
25 | 27 | 26 | ||
26 | 28 | >>> login("test@canonical.com") | 27 | >>> login("test@canonical.com") |
27 | 28 | >>> from lp.registry.interfaces.person import IPersonSet | ||
28 | 29 | >>> name12 = getUtility(IPersonSet).getByName("name12") | 29 | >>> name12 = getUtility(IPersonSet).getByName("name12") |
30 | 30 | >>> new_token = cprov.archive.newAuthToken(name12) | 30 | >>> new_token = joe_private_ppa.newAuthToken(name12) |
31 | 31 | Traceback (most recent call last): | 31 | Traceback (most recent call last): |
32 | 32 | ... | 32 | ... |
33 | 33 | Unauthorized: You do not have a subscription for | 33 | Unauthorized: You do not have a subscription for |
41 | 34 | PPA for Celso Providelo. | 34 | PPA for Joe Smith. |
42 | 35 | 35 | ||
43 | 36 | Create a subscription for name12 to cprov's archive: | 36 | Create a subscription for name12 to joe's archive: |
44 | 37 | 37 | ||
45 | 38 | >>> login("celso.providelo@canonical.com") | 38 | >>> login_person(joe) |
46 | 39 | >>> subscription_to_cprov_archive = cprov.archive.newSubscription( | 39 | >>> subscription_to_joe_private_ppa = joe_private_ppa.newSubscription( |
47 | 40 | ... name12, cprov) | 40 | ... name12, joe) |
48 | 41 | >>> login("test@canonical.com") | 41 | >>> login("test@canonical.com") |
49 | 42 | 42 | ||
50 | 43 | Now try again to create a token as name12 - this time it works: | 43 | Now try again to create a token as name12 - this time it works: |
51 | 44 | 44 | ||
53 | 45 | >>> token_with_random_string = cprov.archive.newAuthToken(name12) | 45 | >>> token_with_random_string = joe_private_ppa.newAuthToken(name12) |
54 | 46 | 46 | ||
55 | 47 | By default the tokens are 20 characters long. | 47 | By default the tokens are 20 characters long. |
56 | 48 | 48 | ||
57 | @@ -51,26 +51,26 @@ | |||
58 | 51 | 51 | ||
59 | 52 | It is not possible to create a second token when one already exists: | 52 | It is not possible to create a second token when one already exists: |
60 | 53 | 53 | ||
62 | 54 | >>> new_token = cprov.archive.newAuthToken(name12) | 54 | >>> new_token = joe_private_ppa.newAuthToken(name12) |
63 | 55 | Traceback (most recent call last): | 55 | Traceback (most recent call last): |
64 | 56 | ... | 56 | ... |
65 | 57 | ArchiveSubscriptionError: Sample Person already has a token for | 57 | ArchiveSubscriptionError: Sample Person already has a token for |
67 | 58 | PPA for Celso Providelo. | 58 | PPA for Joe Smith. |
68 | 59 | 59 | ||
69 | 60 | So deactivate the old token so that we can create a new token: | 60 | So deactivate the old token so that we can create a new token: |
70 | 61 | 61 | ||
72 | 62 | >>> login("celso.providelo@canonical.com") | 62 | >>> login_person(joe) |
73 | 63 | >>> token_with_random_string.deactivate() | 63 | >>> token_with_random_string.deactivate() |
74 | 64 | >>> login("test@canonical.com") | 64 | >>> login("test@canonical.com") |
75 | 65 | 65 | ||
76 | 66 | We can also specify our own token for testing purposes: | 66 | We can also specify our own token for testing purposes: |
77 | 67 | 67 | ||
79 | 68 | >>> new_token = cprov.archive.newAuthToken(name12, u"testtoken") | 68 | >>> new_token = joe_private_ppa.newAuthToken(name12, u"testtoken") |
80 | 69 | 69 | ||
81 | 70 | The new token is returned and reflects the data: | 70 | The new token is returned and reflects the data: |
82 | 71 | 71 | ||
83 | 72 | >>> print new_token.archive.displayname | 72 | >>> print new_token.archive.displayname |
85 | 73 | PPA for Celso Providelo | 73 | PPA for Joe Smith |
86 | 74 | 74 | ||
87 | 75 | >>> print new_token.person.name | 75 | >>> print new_token.person.name |
88 | 76 | name12 | 76 | name12 |
89 | @@ -79,7 +79,7 @@ | |||
90 | 79 | testtoken | 79 | testtoken |
91 | 80 | 80 | ||
92 | 81 | >>> print new_token.archive_url | 81 | >>> print new_token.archive_url |
94 | 82 | http://name12:testtoken@private-ppa.launchpad.dev/cprov/ppa/ubuntu | 82 | http://name12:testtoken@private-ppa.launchpad.dev/joe/ppa/... |
95 | 83 | 83 | ||
96 | 84 | Commit the new token to the database. | 84 | Commit the new token to the database. |
97 | 85 | 85 | ||
98 | @@ -126,7 +126,7 @@ | |||
99 | 126 | 126 | ||
100 | 127 | It's also possible to retrieve a set of all the tokens for an archive. | 127 | It's also possible to retrieve a set of all the tokens for an archive. |
101 | 128 | 128 | ||
103 | 129 | >>> tokens = token_set.getByArchive(cprov.archive) | 129 | >>> tokens = token_set.getByArchive(joe_private_ppa) |
104 | 130 | >>> print tokens.count() | 130 | >>> print tokens.count() |
105 | 131 | 1 | 131 | 1 |
106 | 132 | 132 | ||
107 | @@ -153,7 +153,7 @@ | |||
108 | 153 | ... | 153 | ... |
109 | 154 | Unauthorized:... | 154 | Unauthorized:... |
110 | 155 | 155 | ||
112 | 156 | >>> login("celso.providelo@canonical.com") | 156 | >>> login_person(joe) |
113 | 157 | >>> new_token.deactivate() | 157 | >>> new_token.deactivate() |
114 | 158 | 158 | ||
115 | 159 | Deactivating sets the date_deactivated value. | 159 | Deactivating sets the date_deactivated value. |
116 | @@ -163,14 +163,14 @@ | |||
117 | 163 | 163 | ||
118 | 164 | We can do this as an admin too: | 164 | We can do this as an admin too: |
119 | 165 | 165 | ||
121 | 166 | >>> new_token = cprov.archive.newAuthToken(name12) | 166 | >>> new_token = joe_private_ppa.newAuthToken(name12) |
122 | 167 | >>> login("admin@canonical.com") | 167 | >>> login("admin@canonical.com") |
123 | 168 | >>> new_token.deactivate() | 168 | >>> new_token.deactivate() |
124 | 169 | 169 | ||
125 | 170 | Deactivating a token stops it being returned from getByArchive(). The | 170 | Deactivating a token stops it being returned from getByArchive(). The |
126 | 171 | previous count of 1 is now reduced to 0. | 171 | previous count of 1 is now reduced to 0. |
127 | 172 | 172 | ||
129 | 173 | >>> token_set.getByArchive(cprov.archive).count() | 173 | >>> token_set.getByArchive(joe_private_ppa).count() |
130 | 174 | 0 | 174 | 0 |
131 | 175 | 175 | ||
132 | 176 | The IArchiveAuthTokenSet.getActiveTokenForArchiveAndPerson() method will | 176 | The IArchiveAuthTokenSet.getActiveTokenForArchiveAndPerson() method will |
133 | 177 | 177 | ||
134 | === modified file 'lib/lp/soyuz/doc/archivesubscriber.txt' | |||
135 | --- lib/lp/soyuz/doc/archivesubscriber.txt 2010-02-11 09:14:17 +0000 | |||
136 | +++ lib/lp/soyuz/doc/archivesubscriber.txt 2010-02-26 15:38:20 +0000 | |||
137 | @@ -61,7 +61,7 @@ | |||
138 | 61 | Unauthorized:... | 61 | Unauthorized:... |
139 | 62 | 62 | ||
140 | 63 | If we log in as cprov it will still not work because his archive is | 63 | If we log in as cprov it will still not work because his archive is |
142 | 64 | currently public: | 64 | public: |
143 | 65 | 65 | ||
144 | 66 | >>> login("celso.providelo@canonical.com") | 66 | >>> login("celso.providelo@canonical.com") |
145 | 67 | >>> new_sub = cprov.archive.newSubscription( | 67 | >>> new_sub = cprov.archive.newSubscription( |
146 | @@ -70,20 +70,22 @@ | |||
147 | 70 | ... | 70 | ... |
148 | 71 | ArchiveNotPrivate: Only private archives can have subscriptions. | 71 | ArchiveNotPrivate: Only private archives can have subscriptions. |
149 | 72 | 72 | ||
151 | 73 | After ensuring cprov's archive is private, cprov can create a | 73 | If we create a private ppa for Celso, then he can create a |
152 | 74 | subscription for joesmith: | 74 | subscription for joesmith: |
153 | 75 | 75 | ||
154 | 76 | >>> login('foo.bar@canonical.com') | 76 | >>> login('foo.bar@canonical.com') |
157 | 77 | >>> cprov.archive.buildd_secret = 'really secret' | 77 | >>> cprov_private_ppa = factory.makeArchive( |
158 | 78 | >>> cprov.archive.private = True | 78 | ... owner=cprov, distribution=cprov.archive.distribution, |
159 | 79 | ... private=True, name='p3a', | ||
160 | 80 | ... description="packages to help my friends.") | ||
161 | 79 | >>> login("celso.providelo@canonical.com") | 81 | >>> login("celso.providelo@canonical.com") |
163 | 80 | >>> new_sub = cprov.archive.newSubscription( | 82 | >>> new_sub = cprov_private_ppa.newSubscription( |
164 | 81 | ... joesmith, cprov, description=u"subscription for joesmith") | 83 | ... joesmith, cprov, description=u"subscription for joesmith") |
165 | 82 | 84 | ||
166 | 83 | The new subscription is returned and reflects the data: | 85 | The new subscription is returned and reflects the data: |
167 | 84 | 86 | ||
168 | 85 | >>> print new_sub.displayname | 87 | >>> print new_sub.displayname |
170 | 86 | Joe Smith's access to PPA for Celso Providelo | 88 | Joe Smith's access to PPA named p3a for Celso Providelo |
171 | 87 | 89 | ||
172 | 88 | >>> print new_sub.registrant.name | 90 | >>> print new_sub.registrant.name |
173 | 89 | cprov | 91 | cprov |
174 | @@ -109,15 +111,15 @@ | |||
175 | 109 | From: Celso Providelo <noreply@launchpad.net> | 111 | From: Celso Providelo <noreply@launchpad.net> |
176 | 110 | To: joe@example.com | 112 | To: joe@example.com |
177 | 111 | Reply-To: Celso Providelo <celso.providelo@canonical.com> | 113 | Reply-To: Celso Providelo <celso.providelo@canonical.com> |
179 | 112 | Subject: PPA access granted for PPA for Celso Providelo | 114 | Subject: PPA access granted for PPA named p3a for Celso Providelo |
180 | 113 | Hello Joe Smith, | 115 | Hello Joe Smith, |
181 | 114 | <BLANKLINE> | 116 | <BLANKLINE> |
182 | 115 | Launchpad: access to a private archive | 117 | Launchpad: access to a private archive |
183 | 116 | -------------------------------------- | 118 | -------------------------------------- |
184 | 117 | <BLANKLINE> | 119 | <BLANKLINE> |
185 | 118 | Celso Providelo has granted you access to a private software archive | 120 | Celso Providelo has granted you access to a private software archive |
188 | 119 | "PPA for Celso Providelo" (ppa:cprov/ppa), which is hosted by Launchpad | 121 | "PPA named p3a for Celso Providelo" (ppa:cprov/p3a), which is hosted |
189 | 120 | and has the following description: | 122 | by Launchpad and has the following description: |
190 | 121 | <BLANKLINE> | 123 | <BLANKLINE> |
191 | 122 | packages to help my friends. | 124 | packages to help my friends. |
192 | 123 | <BLANKLINE> | 125 | <BLANKLINE> |
193 | @@ -143,21 +145,22 @@ | |||
194 | 143 | A subscription for a subscriber who already has a current subscription | 145 | A subscription for a subscriber who already has a current subscription |
195 | 144 | cannot be created: | 146 | cannot be created: |
196 | 145 | 147 | ||
198 | 146 | >>> new_sub = cprov.archive.newSubscription( | 148 | >>> new_sub = cprov_private_ppa.newSubscription( |
199 | 147 | ... joesmith, cprov, description=u"subscription for joesmith") | 149 | ... joesmith, cprov, description=u"subscription for joesmith") |
200 | 148 | Traceback (most recent call last): | 150 | Traceback (most recent call last): |
201 | 149 | ... | 151 | ... |
202 | 150 | AlreadySubscribed: Joe Smith already has a current subscription for | 152 | AlreadySubscribed: Joe Smith already has a current subscription for |
204 | 151 | 'PPA for Celso Providelo'. | 153 | 'PPA named p3a for Celso Providelo'. |
205 | 152 | 154 | ||
206 | 153 | 155 | ||
207 | 154 | Add another subscription for the test user, this time to mark's ppa: | 156 | Add another subscription for the test user, this time to mark's ppa: |
208 | 155 | 157 | ||
209 | 156 | >>> login("mark@example.com") | 158 | >>> login("mark@example.com") |
210 | 157 | >>> mark = getUtility(IPersonSet).getByName("mark") | 159 | >>> mark = getUtility(IPersonSet).getByName("mark") |
214 | 158 | >>> mark.archive.buildd_secret = "really secret" | 160 | >>> mark_private_ppa = factory.makeArchive( |
215 | 159 | >>> mark.archive.private = True | 161 | ... owner=mark, distribution=mark.archive.distribution, |
216 | 160 | >>> new_sub_to_mark_ppa = mark.archive.newSubscription( | 162 | ... private=True, name='p3a') |
217 | 163 | >>> new_sub_to_mark_ppa = mark_private_ppa.newSubscription( | ||
218 | 161 | ... joesmith, mark, description=u"subscription for joesmith") | 164 | ... joesmith, mark, description=u"subscription for joesmith") |
219 | 162 | 165 | ||
220 | 163 | >>> print_emails() | 166 | >>> print_emails() |
221 | @@ -167,7 +170,7 @@ | |||
222 | 167 | 170 | ||
223 | 168 | And also a subscription for a Team: | 171 | And also a subscription for a Team: |
224 | 169 | 172 | ||
226 | 170 | >>> new_team_sub_to_mark_ppa = mark.archive.newSubscription( | 173 | >>> new_team_sub_to_mark_ppa = mark_private_ppa.newSubscription( |
227 | 171 | ... team_cprov, mark, description=u"Access for cprov team") | 174 | ... team_cprov, mark, description=u"Access for cprov team") |
228 | 172 | 175 | ||
229 | 173 | >>> print_emails() | 176 | >>> print_emails() |
230 | @@ -219,7 +222,7 @@ | |||
231 | 219 | 222 | ||
232 | 220 | >>> print sub_set.getBySubscriber( | 223 | >>> print sub_set.getBySubscriber( |
233 | 221 | ... new_sub.subscriber)[0].archive.displayname | 224 | ... new_sub.subscriber)[0].archive.displayname |
235 | 222 | PPA for Celso Providelo | 225 | PPA named p3a for Celso Providelo |
236 | 223 | 226 | ||
237 | 224 | >>> print sub_set.getByArchive(new_sub.archive)[0].subscriber.name | 227 | >>> print sub_set.getByArchive(new_sub.archive)[0].subscriber.name |
238 | 225 | joesmith | 228 | joesmith |
239 | @@ -229,7 +232,7 @@ | |||
240 | 229 | 232 | ||
241 | 230 | >>> print sub_set.getBySubscriber( | 233 | >>> print sub_set.getBySubscriber( |
242 | 231 | ... new_sub.subscriber, new_sub.archive)[0].archive.displayname | 234 | ... new_sub.subscriber, new_sub.archive)[0].archive.displayname |
244 | 232 | PPA for Celso Providelo | 235 | PPA named p3a for Celso Providelo |
245 | 233 | 236 | ||
246 | 234 | By default the getBySubscriber() and getByArchive() methods return | 237 | By default the getBySubscriber() and getByArchive() methods return |
247 | 235 | all current subscriptions, most recently created first: | 238 | all current subscriptions, most recently created first: |
248 | @@ -238,10 +241,10 @@ | |||
249 | 238 | >>> for subscription in sub_set.getBySubscriber(new_sub.subscriber): | 241 | >>> for subscription in sub_set.getBySubscriber(new_sub.subscriber): |
250 | 239 | ... print subscription.archive.displayname | 242 | ... print subscription.archive.displayname |
251 | 240 | ... print subscription.date_created.date() | 243 | ... print subscription.date_created.date() |
254 | 241 | PPA for Celso Providelo 2009-02-26 | 244 | PPA named p3a for Celso Providelo 2009-02-26 |
255 | 242 | PPA for Mark Shuttleworth 2009-02-22 | 245 | PPA named p3a for Mark Shuttleworth 2009-02-22 |
256 | 243 | 246 | ||
258 | 244 | >>> for subscription in sub_set.getByArchive(mark.archive): | 247 | >>> for subscription in sub_set.getByArchive(mark_private_ppa): |
259 | 245 | ... print subscription.subscriber.displayname | 248 | ... print subscription.subscriber.displayname |
260 | 246 | ... print subscription.date_created.date() | 249 | ... print subscription.date_created.date() |
261 | 247 | Team Cprov 2009-02-24 | 250 | Team Cprov 2009-02-24 |
262 | @@ -258,7 +261,7 @@ | |||
263 | 258 | 261 | ||
264 | 259 | >>> sub_set.getBySubscriber(new_sub.subscriber).count() | 262 | >>> sub_set.getBySubscriber(new_sub.subscriber).count() |
265 | 260 | 1 | 263 | 1 |
267 | 261 | >>> sub_set.getByArchive(mark.archive).count() | 264 | >>> sub_set.getByArchive(mark_private_ppa).count() |
268 | 262 | 1 | 265 | 1 |
269 | 263 | 266 | ||
270 | 264 | Unless we explicitly ask for all subscriptions - not just the current ones: | 267 | Unless we explicitly ask for all subscriptions - not just the current ones: |
271 | @@ -266,7 +269,7 @@ | |||
272 | 266 | >>> sub_set.getBySubscriber( | 269 | >>> sub_set.getBySubscriber( |
273 | 267 | ... new_sub.subscriber, current_only=False).count() | 270 | ... new_sub.subscriber, current_only=False).count() |
274 | 268 | 2 | 271 | 2 |
276 | 269 | >>> sub_set.getByArchive(mark.archive, current_only=False).count() | 272 | >>> sub_set.getByArchive(mark_private_ppa, current_only=False).count() |
277 | 270 | 2 | 273 | 2 |
278 | 271 | 274 | ||
279 | 272 | The getBySubscriber() method includes by default subscriptions for teams | 275 | The getBySubscriber() method includes by default subscriptions for teams |
280 | @@ -276,8 +279,8 @@ | |||
281 | 276 | >>> for subscription in sub_set.getBySubscriber(joesmith): | 279 | >>> for subscription in sub_set.getBySubscriber(joesmith): |
282 | 277 | ... print subscription.archive.displayname | 280 | ... print subscription.archive.displayname |
283 | 278 | ... print subscription.description | 281 | ... print subscription.description |
286 | 279 | PPA for Celso Providelo subscription for joesmith | 282 | PPA named p3a for Celso Providelo subscription for joesmith |
287 | 280 | PPA for Mark Shuttleworth Access for cprov team | 283 | PPA named p3a for Mark Shuttleworth Access for cprov team |
288 | 281 | 284 | ||
289 | 282 | Finally, many callsites of getBySubscriber() will be interested not only | 285 | Finally, many callsites of getBySubscriber() will be interested not only |
290 | 283 | in each subscription of the subscriber, but also the generated | 286 | in each subscription of the subscriber, but also the generated |
291 | @@ -286,7 +289,7 @@ | |||
292 | 286 | 289 | ||
293 | 287 | First create a token for joesmith's subscription for cprov's archive: | 290 | First create a token for joesmith's subscription for cprov's archive: |
294 | 288 | 291 | ||
296 | 289 | >>> joesmith_token = cprov.archive.newAuthToken(joesmith, u"test_token") | 292 | >>> joesmith_token = cprov_private_ppa.newAuthToken(joesmith, u"test_token") |
297 | 290 | 293 | ||
298 | 291 | Now print out all subscriptions with their tokens for joesmith: | 294 | Now print out all subscriptions with their tokens for joesmith: |
299 | 292 | 295 | ||
300 | @@ -300,8 +303,8 @@ | |||
301 | 300 | ... print token_text | 303 | ... print token_text |
302 | 301 | >>> print_subscriptions_with_tokens( | 304 | >>> print_subscriptions_with_tokens( |
303 | 302 | ... sub_set.getBySubscriberWithActiveToken(joesmith)) | 305 | ... sub_set.getBySubscriberWithActiveToken(joesmith)) |
306 | 303 | PPA for Celso Providelo test_token | 306 | PPA named p3a for Celso Providelo test_token |
307 | 304 | PPA for Mark Shuttleworth None | 307 | PPA named p3a for Mark Shuttleworth None |
308 | 305 | 308 | ||
309 | 306 | Deactivated tokens are not included with the returned token for a | 309 | Deactivated tokens are not included with the returned token for a |
310 | 307 | subscription: | 310 | subscription: |
311 | @@ -312,8 +315,8 @@ | |||
312 | 312 | 315 | ||
313 | 313 | >>> print_subscriptions_with_tokens( | 316 | >>> print_subscriptions_with_tokens( |
314 | 314 | ... sub_set.getBySubscriberWithActiveToken(joesmith)) | 317 | ... sub_set.getBySubscriberWithActiveToken(joesmith)) |
317 | 315 | PPA for Celso Providelo None | 318 | PPA named p3a for Celso Providelo None |
318 | 316 | PPA for Mark Shuttleworth None | 319 | PPA named p3a for Mark Shuttleworth None |
319 | 317 | 320 | ||
320 | 318 | == Amending Subscriptions == | 321 | == Amending Subscriptions == |
321 | 319 | 322 | ||
322 | @@ -402,7 +405,7 @@ | |||
323 | 402 | >>> for subscription in sub_set.getBySubscriber(joesmith): | 405 | >>> for subscription in sub_set.getBySubscriber(joesmith): |
324 | 403 | ... print subscription.archive.displayname | 406 | ... print subscription.archive.displayname |
325 | 404 | ... print subscription.description | 407 | ... print subscription.description |
327 | 405 | PPA for Mark Shuttleworth Access for cprov team | 408 | PPA named p3a for Mark Shuttleworth Access for cprov team |
328 | 406 | 409 | ||
329 | 407 | >>> subscription = sub_set.getBySubscriber(joesmith).first() | 410 | >>> subscription = sub_set.getBySubscriber(joesmith).first() |
330 | 408 | 411 | ||
331 | @@ -419,7 +422,7 @@ | |||
332 | 419 | a separate subscription), then he will no longer be listed as a non-active | 422 | a separate subscription), then he will no longer be listed as a non-active |
333 | 420 | subscriber for this subscription: | 423 | subscriber for this subscription: |
334 | 421 | 424 | ||
336 | 422 | >>> joesmith_token = mark.archive.newAuthToken(joesmith) | 425 | >>> joesmith_token = mark_private_ppa.newAuthToken(joesmith) |
337 | 423 | >>> for person in subscription.getNonActiveSubscribers(): | 426 | >>> for person in subscription.getNonActiveSubscribers(): |
338 | 424 | ... print person.displayname | 427 | ... print person.displayname |
339 | 425 | Celso Providelo | 428 | Celso Providelo |
340 | @@ -433,7 +436,7 @@ | |||
341 | 433 | ... displayname="Harry Smith", | 436 | ... displayname="Harry Smith", |
342 | 434 | ... password="test", | 437 | ... password="test", |
343 | 435 | ... email="harry@example.com") | 438 | ... email="harry@example.com") |
345 | 436 | >>> subscription = mark.archive.newSubscription( | 439 | >>> subscription = mark_private_ppa.newSubscription( |
346 | 437 | ... harrysmith, mark, description=u"subscription for joesmith") | 440 | ... harrysmith, mark, description=u"subscription for joesmith") |
347 | 438 | >>> for person in subscription.getNonActiveSubscribers(): | 441 | >>> for person in subscription.getNonActiveSubscribers(): |
348 | 439 | ... print person.displayname | 442 | ... print person.displayname |
349 | @@ -443,7 +446,7 @@ | |||
350 | 443 | getNonActiveSubscribers will return an empty result set as he is now | 446 | getNonActiveSubscribers will return an empty result set as he is now |
351 | 444 | "active". | 447 | "active". |
352 | 445 | 448 | ||
354 | 446 | >>> harry_token = mark.archive.newAuthToken(harrysmith) | 449 | >>> harry_token = mark_private_ppa.newAuthToken(harrysmith) |
355 | 447 | >>> print subscription.getNonActiveSubscribers().count() | 450 | >>> print subscription.getNonActiveSubscribers().count() |
356 | 448 | 0 | 451 | 0 |
357 | 449 | 452 | ||
358 | @@ -453,7 +456,7 @@ | |||
359 | 453 | >>> launchpad_devs = getUtility(IPersonSet).getByName('launchpad') | 456 | >>> launchpad_devs = getUtility(IPersonSet).getByName('launchpad') |
360 | 454 | >>> ignored = launchpad_devs.addMember( | 457 | >>> ignored = launchpad_devs.addMember( |
361 | 455 | ... team_cprov, mark, force_team_add=True) | 458 | ... team_cprov, mark, force_team_add=True) |
363 | 456 | >>> subscription = mark.archive.newSubscription( | 459 | >>> subscription = mark_private_ppa.newSubscription( |
364 | 457 | ... launchpad_devs, mark, description=u"LP team too") | 460 | ... launchpad_devs, mark, description=u"LP team too") |
365 | 458 | >>> for person in subscription.getNonActiveSubscribers(): | 461 | >>> for person in subscription.getNonActiveSubscribers(): |
366 | 459 | ... print person.displayname | 462 | ... print person.displayname |
367 | 460 | 463 | ||
368 | === modified file 'lib/lp/soyuz/doc/build.txt' | |||
369 | --- lib/lp/soyuz/doc/build.txt 2010-02-10 11:21:41 +0000 | |||
370 | +++ lib/lp/soyuz/doc/build.txt 2010-02-26 15:38:20 +0000 | |||
371 | @@ -220,8 +220,9 @@ | |||
372 | 220 | storeUploadLog() upload the given content as a restricted file. | 220 | storeUploadLog() upload the given content as a restricted file. |
373 | 221 | 221 | ||
374 | 222 | >>> login('foo.bar@canonical.com') | 222 | >>> login('foo.bar@canonical.com') |
377 | 223 | >>> active_build.archive.buildd_secret = "secret" | 223 | >>> original_archive = active_build.archive |
378 | 224 | >>> active_build.archive.private = True | 224 | >>> private_ppa = factory.makeArchive(private=True) |
379 | 225 | >>> removeSecurityProxy(active_build).archive = private_ppa | ||
380 | 225 | >>> login(ANONYMOUS) | 226 | >>> login(ANONYMOUS) |
381 | 226 | 227 | ||
382 | 227 | Simply changing the archive privacy after the 'upload_log' is stored | 228 | Simply changing the archive privacy after the 'upload_log' is stored |
383 | @@ -249,11 +250,11 @@ | |||
384 | 249 | >>> print active_build.upload_log.restricted | 250 | >>> print active_build.upload_log.restricted |
385 | 250 | True | 251 | True |
386 | 251 | 252 | ||
388 | 252 | Restore ubuntu main archive state to not affect the rest of the tests. | 253 | Restore ubuntu main archive as the target to not affect the rest of the |
389 | 254 | tests. | ||
390 | 253 | 255 | ||
391 | 254 | >>> login('foo.bar@canonical.com') | 256 | >>> login('foo.bar@canonical.com') |
394 | 255 | >>> active_build.archive.buildd_secret = '' | 257 | >>> removeSecurityProxy(active_build).archive = original_archive |
393 | 256 | >>> active_build.archive.private = False | ||
395 | 257 | >>> login(ANONYMOUS) | 258 | >>> login(ANONYMOUS) |
396 | 258 | 259 | ||
397 | 259 | Since ubuntu/warty is already released the failed build can't be | 260 | Since ubuntu/warty is already released the failed build can't be |
398 | @@ -770,38 +771,46 @@ | |||
399 | 770 | 771 | ||
400 | 771 | >>> login('foo.bar@canonical.com') | 772 | >>> login('foo.bar@canonical.com') |
401 | 772 | 773 | ||
403 | 773 | Let's make cprov's archive private (and hence its builds become private): | 774 | Let's create a private PPA for cprov (and hence its builds become private): |
404 | 774 | 775 | ||
405 | 775 | >>> from canonical.launchpad.interfaces import IPersonSet | 776 | >>> from canonical.launchpad.interfaces import IPersonSet |
406 | 776 | >>> cprov = removeSecurityProxy(getUtility(IPersonSet).getByName('cprov')) | 777 | >>> cprov = removeSecurityProxy(getUtility(IPersonSet).getByName('cprov')) |
413 | 777 | >>> cprov.archive.buildd_secret = "secret" | 778 | >>> cprov_private_ppa = factory.makeArchive( |
414 | 778 | >>> cprov.archive.private = True | 779 | ... owner=cprov, private=True, name='p3a', |
415 | 779 | >>> flush_database_updates() | 780 | ... distribution=cprov.archive.distribution) |
410 | 780 | |||
411 | 781 | The default set of builds with no user specified excludes private builds: | ||
412 | 782 | |||
416 | 783 | >>> from canonical.launchpad.interfaces import IBuilderSet | 781 | >>> from canonical.launchpad.interfaces import IBuilderSet |
417 | 784 | >>> bob = getUtility(IBuilderSet)['bob'] | 782 | >>> bob = getUtility(IBuilderSet)['bob'] |
418 | 783 | >>> binaries = test_publisher.getPubBinaries( | ||
419 | 784 | ... archive=cprov_private_ppa, builder=bob, | ||
420 | 785 | ... binaryname='privacycheck-bin') | ||
421 | 786 | >>> flush_database_updates() | ||
422 | 787 | |||
423 | 788 | The default set of builds with no user specified excludes private builds: | ||
424 | 789 | |||
425 | 785 | >>> bob_builds = bob.getBuildRecords() | 790 | >>> bob_builds = bob.getBuildRecords() |
426 | 786 | >>> print_build_details(bob_builds) | 791 | >>> print_build_details(bob_builds) |
427 | 787 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 792 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
428 | 793 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | ||
429 | 794 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE | ||
430 | 795 | cprov: i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE | ||
431 | 788 | no-priv: i386 build of cdrkit 1.0 in ubuntu warty RELEASE | 796 | no-priv: i386 build of cdrkit 1.0 in ubuntu warty RELEASE |
432 | 789 | ubuntu-team: i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE | 797 | ubuntu-team: i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE |
433 | 790 | ... | 798 | ... |
434 | 791 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 799 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
436 | 792 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu breezy-autotest | 800 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu breezy-autotest |
437 | 793 | RELEASE | 801 | RELEASE |
439 | 794 | 802 | ||
440 | 795 | >>> bob_builds.count() | 803 | >>> bob_builds.count() |
442 | 796 | 13 | 804 | 16 |
443 | 797 | 805 | ||
444 | 798 | If we include an admin user, we can see all the builds. Here, we get | 806 | If we include an admin user, we can see all the builds. Here, we get |
446 | 799 | three additional private builds for cprov: | 807 | an additional private build for cprov: |
447 | 800 | 808 | ||
448 | 801 | >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities | 809 | >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities |
449 | 802 | >>> admin = getUtility(ILaunchpadCelebrities).admin | 810 | >>> admin = getUtility(ILaunchpadCelebrities).admin |
450 | 803 | >>> bob_builds = bob.getBuildRecords(user=admin) | 811 | >>> bob_builds = bob.getBuildRecords(user=admin) |
451 | 804 | >>> print_build_details(bob_builds) | 812 | >>> print_build_details(bob_builds) |
452 | 813 | cprov: i386 build of privacycheck 666 in ubuntutest breezy-autotest... | ||
453 | 805 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 814 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
454 | 806 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 815 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
455 | 807 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE | 816 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE |
456 | @@ -812,14 +821,15 @@ | |||
457 | 812 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 821 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
458 | 813 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu breezy-autotest | 822 | ubuntu-team: i386 build of mozilla-firefox 0.9 in ubuntu breezy-autotest |
459 | 814 | RELEASE | 823 | RELEASE |
461 | 815 | 824 | ||
462 | 816 | >>> bob_builds.count() | 825 | >>> bob_builds.count() |
464 | 817 | 16 | 826 | 17 |
465 | 818 | 827 | ||
466 | 819 | Cprov can also see his own builds of course: | 828 | Cprov can also see his own builds of course: |
467 | 820 | 829 | ||
468 | 821 | >>> bob_builds = bob.getBuildRecords(user=cprov) | 830 | >>> bob_builds = bob.getBuildRecords(user=cprov) |
469 | 822 | >>> print_build_details(bob_builds) | 831 | >>> print_build_details(bob_builds) |
470 | 832 | cprov: i386 build of privacycheck 666 in ubuntutest breezy-autotest... | ||
471 | 823 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 833 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
472 | 824 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 834 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
473 | 825 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE | 835 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE |
474 | @@ -832,7 +842,7 @@ | |||
475 | 832 | RELEASE | 842 | RELEASE |
476 | 833 | 843 | ||
477 | 834 | >>> bob_builds.count() | 844 | >>> bob_builds.count() |
479 | 835 | 16 | 845 | 17 |
480 | 836 | 846 | ||
481 | 837 | Buildd admins specifically are not allowed to see private builds, which will | 847 | Buildd admins specifically are not allowed to see private builds, which will |
482 | 838 | be filtered from the list returned: | 848 | be filtered from the list returned: |
483 | @@ -844,6 +854,9 @@ | |||
484 | 844 | >>> bob_builds = bob.getBuildRecords(user=buildd_admin) | 854 | >>> bob_builds = bob.getBuildRecords(user=buildd_admin) |
485 | 845 | >>> print_build_details(bob_builds) | 855 | >>> print_build_details(bob_builds) |
486 | 846 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 856 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
487 | 857 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | ||
488 | 858 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE | ||
489 | 859 | cprov: i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE | ||
490 | 847 | no-priv: i386 build of cdrkit 1.0 in ubuntu warty RELEASE | 860 | no-priv: i386 build of cdrkit 1.0 in ubuntu warty RELEASE |
491 | 848 | ubuntu-team: i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE | 861 | ubuntu-team: i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE |
492 | 849 | ... | 862 | ... |
493 | @@ -852,7 +865,7 @@ | |||
494 | 852 | RELEASE | 865 | RELEASE |
495 | 853 | 866 | ||
496 | 854 | >>> bob_builds.count() | 867 | >>> bob_builds.count() |
498 | 855 | 13 | 868 | 16 |
499 | 856 | 869 | ||
500 | 857 | You can filter on build state: | 870 | You can filter on build state: |
501 | 858 | 871 | ||
502 | @@ -874,13 +887,6 @@ | |||
503 | 874 | >>> bob_pmount_ok_builds.count() | 887 | >>> bob_pmount_ok_builds.count() |
504 | 875 | 4 | 888 | 4 |
505 | 876 | 889 | ||
506 | 877 | Restore cprov to non-private: | ||
507 | 878 | |||
508 | 879 | >>> login('foo.bar@canonical.com') | ||
509 | 880 | >>> removeSecurityProxy(cprov).archive.private = False | ||
510 | 881 | >>> flush_database_updates() | ||
511 | 882 | >>> login(ANONYMOUS) | ||
512 | 883 | |||
513 | 884 | 890 | ||
514 | 885 | == AssertionErrors in IBuild == | 891 | == AssertionErrors in IBuild == |
515 | 886 | 892 | ||
516 | @@ -1169,26 +1175,12 @@ | |||
517 | 1169 | IBuild's content class is wrapped in a Zope security wrapper that prevents | 1175 | IBuild's content class is wrapped in a Zope security wrapper that prevents |
518 | 1170 | access to private builds for unauthorised users. | 1176 | access to private builds for unauthorised users. |
519 | 1171 | 1177 | ||
520 | 1172 | cprov's archive is private which makes its builds private. We'll add | ||
521 | 1173 | an extra build that is not published anywhere but in his PPA. | ||
522 | 1174 | |||
523 | 1175 | >>> login('foo.bar@canonical.com') | ||
524 | 1176 | >>> test_publisher.prepareBreezyAutotest() | ||
525 | 1177 | >>> removeSecurityProxy(cprov).archive.private = True | ||
526 | 1178 | >>> private_source_pub = test_publisher.getPubSource( | ||
527 | 1179 | ... status=PackagePublishingStatus.PUBLISHED, | ||
528 | 1180 | ... sourcename='privacy-test', | ||
529 | 1181 | ... architecturehintlist='i386', | ||
530 | 1182 | ... archive=cprov.archive) | ||
531 | 1183 | >>> [private_build] = private_source_pub.createMissingBuilds() | ||
532 | 1184 | >>> private_build.builder = bob | ||
533 | 1185 | >>> flush_database_updates() | ||
534 | 1186 | |||
535 | 1187 | Accessing the cprov builds when logged in as admin will see the records: | 1178 | Accessing the cprov builds when logged in as admin will see the records: |
536 | 1188 | 1179 | ||
537 | 1180 | >>> login('admin@canonical.com') | ||
538 | 1189 | >>> bob_builds = bob.getBuildRecords(user=admin) | 1181 | >>> bob_builds = bob.getBuildRecords(user=admin) |
539 | 1190 | >>> print_build_details(bob_builds) | 1182 | >>> print_build_details(bob_builds) |
541 | 1191 | cprov: i386 build of privacy-test 666 in ubuntutest breezy-autotest... | 1183 | cprov: i386 build of privacycheck 666 in ubuntutest breezy-autotest... |
542 | 1192 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 1184 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
543 | 1193 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 1185 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
544 | 1194 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE | 1186 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE |
545 | @@ -1200,7 +1192,7 @@ | |||
546 | 1200 | >>> login('celso.providelo@canonical.com') | 1192 | >>> login('celso.providelo@canonical.com') |
547 | 1201 | >>> bob_builds = bob.getBuildRecords(user=admin) | 1193 | >>> bob_builds = bob.getBuildRecords(user=admin) |
548 | 1202 | >>> print_build_details(bob_builds) | 1194 | >>> print_build_details(bob_builds) |
550 | 1203 | cprov: i386 build of privacy-test 666 in ubuntutest breezy-autotest... | 1195 | cprov: i386 build of privacycheck 666 in ubuntutest breezy-autotest... |
551 | 1204 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 1196 | ubuntu-team: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
552 | 1205 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE | 1197 | cprov: hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE |
553 | 1206 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE | 1198 | cprov: i386 build of pmount 0.1-1 in ubuntu warty RELEASE |
554 | @@ -1446,10 +1438,10 @@ | |||
555 | 1446 | 1438 | ||
556 | 1447 | == Getting the build records for a particular builder == | 1439 | == Getting the build records for a particular builder == |
557 | 1448 | 1440 | ||
559 | 1449 | The getBuildsForBuilder method returns all the builds for the | 1441 | The getBuildsForBuilder method returns all the builds for the |
560 | 1450 | specified builder ID, ordered from most-recently built. | 1442 | specified builder ID, ordered from most-recently built. |
561 | 1451 | 1443 | ||
563 | 1452 | Create some source packages with which to test the | 1444 | Create some source packages with which to test the |
564 | 1453 | getBuildsForBuilder method: | 1445 | getBuildsForBuilder method: |
565 | 1454 | 1446 | ||
566 | 1455 | >>> src_pkg_earlier = test_publisher.getPubSource( | 1447 | >>> src_pkg_earlier = test_publisher.getPubSource( |
567 | @@ -1459,7 +1451,7 @@ | |||
568 | 1459 | ... status=PackagePublishingStatus.PUBLISHED, | 1451 | ... status=PackagePublishingStatus.PUBLISHED, |
569 | 1460 | ... sourcename='laterbuildsrc', | 1452 | ... sourcename='laterbuildsrc', |
570 | 1461 | ... architecturehintlist='hppa i386') | 1453 | ... architecturehintlist='hppa i386') |
572 | 1462 | 1454 | ||
573 | 1463 | Create the builds based on the source packages, with the builds | 1455 | Create the builds based on the source packages, with the builds |
574 | 1464 | for 'earlierbuildsrc' built one day before the 'laterbuildsrc': | 1456 | for 'earlierbuildsrc' built one day before the 'laterbuildsrc': |
575 | 1465 | 1457 | ||
576 | @@ -1474,10 +1466,10 @@ | |||
577 | 1474 | >>> later_builds = src_pkg_later.createMissingBuilds() | 1466 | >>> later_builds = src_pkg_later.createMissingBuilds() |
578 | 1475 | >>> for build in later_builds: | 1467 | >>> for build in later_builds: |
579 | 1476 | ... build.datebuilt = eg_build_date | 1468 | ... build.datebuilt = eg_build_date |
581 | 1477 | 1469 | ||
582 | 1478 | Ensure that the i386 builds are created by the 'frog' builder, | 1470 | Ensure that the i386 builds are created by the 'frog' builder, |
583 | 1479 | while the hppa builds are created by 'bob' the builder: | 1471 | while the hppa builds are created by 'bob' the builder: |
585 | 1480 | 1472 | ||
586 | 1481 | >>> builds = earlier_builds + later_builds | 1473 | >>> builds = earlier_builds + later_builds |
587 | 1482 | >>> for build in builds: | 1474 | >>> for build in builds: |
588 | 1483 | ... if build.processor.name == u'386': | 1475 | ... if build.processor.name == u'386': |
589 | @@ -1487,7 +1479,7 @@ | |||
590 | 1487 | 1479 | ||
591 | 1488 | A call to getBuildsForBuilder returns only those builds that were | 1480 | A call to getBuildsForBuilder returns only those builds that were |
592 | 1489 | built by the specified builder, ordered by datebuilt DESC: | 1481 | built by the specified builder, ordered by datebuilt DESC: |
594 | 1490 | 1482 | ||
595 | 1491 | >>> frog_builds = getUtility(IBuildSet).getBuildsForBuilder( | 1483 | >>> frog_builds = getUtility(IBuildSet).getBuildsForBuilder( |
596 | 1492 | ... frog_builder.id) | 1484 | ... frog_builder.id) |
597 | 1493 | >>> print_build_details(frog_builds) | 1485 | >>> print_build_details(frog_builds) |
598 | 1494 | 1486 | ||
599 | === modified file 'lib/lp/soyuz/doc/package-diff.txt' | |||
600 | --- lib/lp/soyuz/doc/package-diff.txt 2009-12-13 11:55:40 +0000 | |||
601 | +++ lib/lp/soyuz/doc/package-diff.txt 2010-02-26 15:38:20 +0000 | |||
602 | @@ -732,11 +732,12 @@ | |||
603 | 732 | >>> print diff.diff_content.restricted | 732 | >>> print diff.diff_content.restricted |
604 | 733 | False | 733 | False |
605 | 734 | 734 | ||
608 | 735 | When we make FooBar's PPA private, the diff becomes 'private' and the | 735 | If the diff is attached to a private PPA, the diff becomes 'private' and |
609 | 736 | new 'diff_content' is stored in the restricted librarian instance. | 736 | the new 'diff_content' is stored in the restricted librarian instance. |
610 | 737 | 737 | ||
613 | 738 | >>> diff.to_source.upload_archive.buildd_secret = 'nhack!' | 738 | >>> private_ppa = factory.makeArchive(private=True) |
614 | 739 | >>> diff.to_source.upload_archive.private = True | 739 | >>> from zope.security.proxy import removeSecurityProxy |
615 | 740 | >>> removeSecurityProxy(diff.to_source).upload_archive = private_ppa | ||
616 | 740 | 741 | ||
617 | 741 | >>> print diff.private | 742 | >>> print diff.private |
618 | 742 | True | 743 | True |
619 | 743 | 744 | ||
620 | === modified file 'lib/lp/soyuz/doc/sourcepackagerelease.txt' | |||
621 | --- lib/lp/soyuz/doc/sourcepackagerelease.txt 2009-12-10 11:42:07 +0000 | |||
622 | +++ lib/lp/soyuz/doc/sourcepackagerelease.txt 2010-02-26 15:38:20 +0000 | |||
623 | @@ -265,11 +265,11 @@ | |||
624 | 265 | >>> cprov = getUtility(IPersonSet).getByName('cprov') | 265 | >>> cprov = getUtility(IPersonSet).getByName('cprov') |
625 | 266 | 266 | ||
626 | 267 | >>> login('foo.bar@canonical.com') | 267 | >>> login('foo.bar@canonical.com') |
629 | 268 | >>> cprov.archive.buildd_secret = 'boing' | 268 | >>> cprov_private_ppa = factory.makeArchive( |
630 | 269 | >>> cprov.archive.private = True | 269 | ... owner=cprov, private=True) |
631 | 270 | 270 | ||
632 | 271 | >>> private_publication = test_publisher.getPubSource( | 271 | >>> private_publication = test_publisher.getPubSource( |
634 | 272 | ... archive=cprov.archive) | 272 | ... archive=cprov_private_ppa) |
635 | 273 | 273 | ||
636 | 274 | >>> test_sourcepackagerelease = private_publication.sourcepackagerelease | 274 | >>> test_sourcepackagerelease = private_publication.sourcepackagerelease |
637 | 275 | >>> print test_sourcepackagerelease.title | 275 | >>> print test_sourcepackagerelease.title |
638 | 276 | 276 | ||
639 | === modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-files.txt' | |||
640 | --- lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2010-01-20 14:29:59 +0000 | |||
641 | +++ lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2010-02-26 15:38:20 +0000 | |||
642 | @@ -15,12 +15,15 @@ | |||
643 | 15 | ... SoyuzTestPublisher) | 15 | ... SoyuzTestPublisher) |
644 | 16 | >>> from lp.registry.interfaces.person import IPersonSet | 16 | >>> from lp.registry.interfaces.person import IPersonSet |
645 | 17 | 17 | ||
647 | 18 | Make the PPA private. | 18 | Create a private PPA for no-priv. |
648 | 19 | 19 | ||
649 | 20 | >>> login('foo.bar@canonical.com') | 20 | >>> login('foo.bar@canonical.com') |
650 | 21 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') | 21 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') |
653 | 22 | >>> no_priv.archive.buildd_secret = 'x' | 22 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
654 | 23 | >>> no_priv.archive.private = True | 23 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
655 | 24 | >>> no_priv_private_ppa = factory.makeArchive( | ||
656 | 25 | ... owner=no_priv, private=True, name='p3a', | ||
657 | 26 | ... distribution=ubuntu) | ||
658 | 24 | 27 | ||
659 | 25 | Initialise SoyuzTestPublisher. | 28 | Initialise SoyuzTestPublisher. |
660 | 26 | 29 | ||
661 | @@ -31,7 +34,7 @@ | |||
662 | 31 | Publish a source. | 34 | Publish a source. |
663 | 32 | 35 | ||
664 | 33 | >>> test_source = test_publisher.getPubSource( | 36 | >>> test_source = test_publisher.getPubSource( |
666 | 34 | ... archive=no_priv.archive, sourcename='test-pkg', | 37 | ... archive=no_priv_private_ppa, sourcename='test-pkg', |
667 | 35 | ... version='1.0') | 38 | ... version='1.0') |
668 | 36 | >>> dsc_file = test_source.sourcepackagerelease.files[0].libraryfile | 39 | >>> dsc_file = test_source.sourcepackagerelease.files[0].libraryfile |
669 | 37 | 40 | ||
670 | @@ -68,10 +71,12 @@ | |||
671 | 68 | Create a subsequent source publication so a package diff can be provided. | 71 | Create a subsequent source publication so a package diff can be provided. |
672 | 69 | 72 | ||
673 | 70 | >>> another_test_source = test_publisher.getPubSource( | 73 | >>> another_test_source = test_publisher.getPubSource( |
675 | 71 | ... archive=no_priv.archive, sourcename='test-pkg', | 74 | ... archive=no_priv_private_ppa, sourcename='test-pkg', |
676 | 72 | ... version='1.1') | 75 | ... version='1.1') |
677 | 73 | >>> another_dsc_file = ( | 76 | >>> another_dsc_file = ( |
678 | 74 | ... another_test_source.sourcepackagerelease.files[0].libraryfile) | 77 | ... another_test_source.sourcepackagerelease.files[0].libraryfile) |
679 | 78 | >>> other_binary_pubs = test_publisher.getPubBinaries( | ||
680 | 79 | ... binaryname='test-bin', pub_source=another_test_source) | ||
681 | 75 | 80 | ||
682 | 76 | >>> package_diff = test_source.sourcepackagerelease.requestDiffTo( | 81 | >>> package_diff = test_source.sourcepackagerelease.requestDiffTo( |
683 | 77 | ... no_priv, another_test_source.sourcepackagerelease) | 82 | ... no_priv, another_test_source.sourcepackagerelease) |
684 | @@ -145,26 +150,26 @@ | |||
685 | 145 | >>> no_priv_browser = setupBrowser( | 150 | >>> no_priv_browser = setupBrowser( |
686 | 146 | ... auth='Basic no-priv@canonical.com:test') | 151 | ... auth='Basic no-priv@canonical.com:test') |
687 | 147 | >>> no_priv_browser.open( | 152 | >>> no_priv_browser.open( |
689 | 148 | ... "http://launchpad.dev/~no-priv/+archive/ppa/+packages") | 153 | ... "http://launchpad.dev/~no-priv/+archive/p3a/+packages") |
690 | 149 | 154 | ||
691 | 150 | >>> print no_priv_browser.title | 155 | >>> print no_priv_browser.title |
693 | 151 | Packages in “PPA for No Privileges Person”... | 156 | Packages in “PPA named p3a for No Privileges Person”... |
694 | 152 | 157 | ||
695 | 153 | Source changesfiles are served on the PPA '+files' traversal. | 158 | Source changesfiles are served on the PPA '+files' traversal. |
696 | 154 | 159 | ||
697 | 155 | >>> check_urls(no_priv_browser, ppa_links, | 160 | >>> check_urls(no_priv_browser, ppa_links, |
699 | 156 | ... 'http://launchpad.dev/~no-priv/+archive/ppa') | 161 | ... 'http://launchpad.dev/~no-priv/+archive/p3a') |
700 | 157 | test-pkg_1.1_source.changes: OK | 162 | test-pkg_1.1_source.changes: OK |
701 | 158 | 163 | ||
702 | 159 | >>> no_priv_browser.getLink('Copy packages').click() | 164 | >>> no_priv_browser.getLink('Copy packages').click() |
703 | 160 | >>> check_urls(no_priv_browser, ppa_links, | 165 | >>> check_urls(no_priv_browser, ppa_links, |
705 | 161 | ... 'http://launchpad.dev/~no-priv/+archive/ppa') | 166 | ... 'http://launchpad.dev/~no-priv/+archive/p3a') |
706 | 162 | test-pkg_1.1_source.changes: OK | 167 | test-pkg_1.1_source.changes: OK |
707 | 163 | 168 | ||
708 | 164 | >>> no_priv_browser.getLink('Cancel').click() | 169 | >>> no_priv_browser.getLink('Cancel').click() |
709 | 165 | >>> no_priv_browser.getLink('Delete packages').click() | 170 | >>> no_priv_browser.getLink('Delete packages').click() |
710 | 166 | >>> check_urls(no_priv_browser, ppa_links, | 171 | >>> check_urls(no_priv_browser, ppa_links, |
712 | 167 | ... 'http://launchpad.dev/~no-priv/+archive/ppa') | 172 | ... 'http://launchpad.dev/~no-priv/+archive/p3a') |
713 | 168 | test-pkg_1.1_source.changes: OK | 173 | test-pkg_1.1_source.changes: OK |
714 | 169 | 174 | ||
715 | 170 | Buildlogs are served on the Build '+files' traversal, when the PPA | 175 | Buildlogs are served on the Build '+files' traversal, when the PPA |
716 | @@ -176,11 +181,11 @@ | |||
717 | 176 | >>> no_priv_browser.getControl("Filter").click() | 181 | >>> no_priv_browser.getControl("Filter").click() |
718 | 177 | 182 | ||
719 | 178 | >>> check_urls(no_priv_browser, builds_links, | 183 | >>> check_urls(no_priv_browser, builds_links, |
721 | 179 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+build/31') | 184 | ... 'http://launchpad.dev/~no-priv/+archive/p3a/+build/31') |
722 | 180 | buildlog_ubuntu-breezy-autotest-i386.test-pkg_1.0_FULLYBUILT.txt.gz: OK | 185 | buildlog_ubuntu-breezy-autotest-i386.test-pkg_1.0_FULLYBUILT.txt.gz: OK |
723 | 181 | 186 | ||
724 | 182 | >>> no_priv_browser.open( | 187 | >>> no_priv_browser.open( |
726 | 183 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+packages') | 188 | ... 'http://launchpad.dev/~no-priv/+archive/p3a/+packages') |
727 | 184 | 189 | ||
728 | 185 | Source and binary files, in the expandable-row area, are served via | 190 | Source and binary files, in the expandable-row area, are served via |
729 | 186 | the PPA '+files' traversal. | 191 | the PPA '+files' traversal. |
730 | @@ -190,7 +195,7 @@ | |||
731 | 190 | >>> no_priv_browser.getLink(id=expander_id).click() | 195 | >>> no_priv_browser.getLink(id=expander_id).click() |
732 | 191 | 196 | ||
733 | 192 | >>> check_urls(no_priv_browser, ppa_1_0_links, | 197 | >>> check_urls(no_priv_browser, ppa_1_0_links, |
735 | 193 | ... 'http://launchpad.dev/~no-priv/+archive/ppa') | 198 | ... 'http://launchpad.dev/~no-priv/+archive/p3a') |
736 | 194 | test-pkg_1.0.dsc: OK | 199 | test-pkg_1.0.dsc: OK |
737 | 195 | test-pkg_1.0.tar.gz: OK | 200 | test-pkg_1.0.tar.gz: OK |
738 | 196 | test-bin_1.0_all.deb: OK | 201 | test-bin_1.0_all.deb: OK |
739 | @@ -200,10 +205,10 @@ | |||
740 | 200 | 205 | ||
741 | 201 | >>> no_priv_browser.getLink('i386').click() | 206 | >>> no_priv_browser.getLink('i386').click() |
742 | 202 | >>> print no_priv_browser.title | 207 | >>> print no_priv_browser.title |
744 | 203 | PPA for No Privileges Person : No Privileges Person | 208 | PPA named p3a for No Privileges Person : No Privileges Person |
745 | 204 | 209 | ||
746 | 205 | >>> check_urls(no_priv_browser, build_links, | 210 | >>> check_urls(no_priv_browser, build_links, |
748 | 206 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+build/31') | 211 | ... 'http://launchpad.dev/~no-priv/+archive/p3a/+build/31') |
749 | 207 | test-bin_1.0_i386.changes: OK | 212 | test-bin_1.0_i386.changes: OK |
750 | 208 | buildlog_...txt.gz: OK | 213 | buildlog_...txt.gz: OK |
751 | 209 | upload_..._log.txt: OK | 214 | upload_..._log.txt: OK |
752 | @@ -212,14 +217,14 @@ | |||
753 | 212 | '+files' traversal. | 217 | '+files' traversal. |
754 | 213 | 218 | ||
755 | 214 | >>> no_priv_browser.open( | 219 | >>> no_priv_browser.open( |
757 | 215 | ... "http://launchpad.dev/~no-priv/+archive/ppa/+packages") | 220 | ... "http://launchpad.dev/~no-priv/+archive/p3a/+packages") |
758 | 216 | 221 | ||
759 | 217 | >>> expander_id = find_tags_by_class( | 222 | >>> expander_id = find_tags_by_class( |
760 | 218 | ... no_priv_browser.contents, 'expander')[0]['id'] | 223 | ... no_priv_browser.contents, 'expander')[0]['id'] |
761 | 219 | >>> no_priv_browser.getLink(id=expander_id).click() | 224 | >>> no_priv_browser.getLink(id=expander_id).click() |
762 | 220 | 225 | ||
763 | 221 | >>> check_urls(no_priv_browser, ppa_1_1_links, | 226 | >>> check_urls(no_priv_browser, ppa_1_1_links, |
765 | 222 | ... 'http://launchpad.dev/~no-priv/+archive/ppa') | 227 | ... 'http://launchpad.dev/~no-priv/+archive/p3a') |
766 | 223 | test-pkg_1.1.dsc: OK | 228 | test-pkg_1.1.dsc: OK |
767 | 224 | test-pkg_1.0_1.1.diff.gz: OK | 229 | test-pkg_1.0_1.1.diff.gz: OK |
768 | 225 | 230 | ||
769 | @@ -230,7 +235,7 @@ | |||
770 | 230 | >>> file_size = str(dsc_file.content.filesize) | 235 | >>> file_size = str(dsc_file.content.filesize) |
771 | 231 | >>> file_mimetype = dsc_file.mimetype | 236 | >>> file_mimetype = dsc_file.mimetype |
772 | 232 | >>> file_lp_url = str( | 237 | >>> file_lp_url = str( |
774 | 233 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+files/%s' % | 238 | ... 'http://launchpad.dev/~no-priv/+archive/p3a/+files/%s' % |
775 | 234 | ... dsc_file.filename) | 239 | ... dsc_file.filename) |
776 | 235 | >>> logout() | 240 | >>> logout() |
777 | 236 | 241 | ||
778 | @@ -271,13 +276,13 @@ | |||
779 | 271 | >>> buildlog_content = buildlog.read() | 276 | >>> buildlog_content = buildlog.read() |
780 | 272 | >>> buildlog_size = str(buildlog.content.filesize) | 277 | >>> buildlog_size = str(buildlog.content.filesize) |
781 | 273 | >>> buildlog_lp_url = str( | 278 | >>> buildlog_lp_url = str( |
783 | 274 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+build/%d/+files/%s' % | 279 | ... 'http://launchpad.dev/~no-priv/+archive/p3a/+build/%d/+files/%s' % |
784 | 275 | ... (build.id, buildlog.filename)) | 280 | ... (build.id, buildlog.filename)) |
785 | 276 | 281 | ||
786 | 277 | >>> diff_content = package_diff.diff_content.read() | 282 | >>> diff_content = package_diff.diff_content.read() |
787 | 278 | >>> diff_size = str(package_diff.diff_content.content.filesize) | 283 | >>> diff_size = str(package_diff.diff_content.content.filesize) |
788 | 279 | >>> diff_lp_url = str( | 284 | >>> diff_lp_url = str( |
790 | 280 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+files/%s' % | 285 | ... 'http://launchpad.dev/~no-priv/+archive/p3a/+files/%s' % |
791 | 281 | ... package_diff.diff_content.filename) | 286 | ... package_diff.diff_content.filename) |
792 | 282 | 287 | ||
793 | 283 | >>> logout() | 288 | >>> logout() |
794 | @@ -321,19 +326,25 @@ | |||
795 | 321 | >>> print no_priv_browser.headers['content-encoding'] | 326 | >>> print no_priv_browser.headers['content-encoding'] |
796 | 322 | gzip | 327 | gzip |
797 | 323 | 328 | ||
806 | 324 | When the PPA and the `LibraryFileAlias` become public, the +files/ | 329 | If the associated PPA and the `LibraryFileAlias` are public, the +files/ |
807 | 325 | proxy redirects to the public http url. | 330 | proxy redirects to the public http url. We'll copy the test sources and |
808 | 326 | 331 | binaries across to no-priv's public ppa. | |
809 | 327 | >>> login('foo.bar@canonical.com') | 332 | |
810 | 328 | 333 | >>> login_person(no_priv) | |
811 | 329 | >>> no_priv = getUtility(IPersonSet).getByName('no-priv') | 334 | >>> from lp.soyuz.scripts.packagecopier import do_copy |
812 | 330 | >>> no_priv.archive.buildd_secret = '' | 335 | >>> from lp.soyuz.interfaces.publishing import PackagePublishingPocket |
813 | 331 | >>> no_priv.archive.private = False | 336 | >>> copies = do_copy( |
814 | 337 | ... no_priv_private_ppa.getPublishedSources(name='test-pkg'), | ||
815 | 338 | ... no_priv.archive, series=ubuntu['warty'], | ||
816 | 339 | ... pocket=PackagePublishingPocket.RELEASE, | ||
817 | 340 | ... include_binaries=True, allow_delayed_copies=False) | ||
818 | 332 | 341 | ||
819 | 333 | >>> from zope.security.proxy import removeSecurityProxy | 342 | >>> from zope.security.proxy import removeSecurityProxy |
820 | 334 | >>> removeSecurityProxy(dsc_file).restricted = False | 343 | >>> removeSecurityProxy(dsc_file).restricted = False |
821 | 335 | |||
822 | 336 | >>> file_librarian_url = dsc_file.http_url | 344 | >>> file_librarian_url = dsc_file.http_url |
823 | 345 | >>> file_lp_url = str( | ||
824 | 346 | ... 'http://launchpad.dev/~no-priv/+archive/ppa/+files/%s' % | ||
825 | 347 | ... dsc_file.filename) | ||
826 | 337 | 348 | ||
827 | 338 | >>> commit() | 349 | >>> commit() |
828 | 339 | >>> logout() | 350 | >>> logout() |
829 | @@ -372,7 +383,7 @@ | |||
830 | 372 | The same redirection happens for +archive/+build/blah urls: | 383 | The same redirection happens for +archive/+build/blah urls: |
831 | 373 | 384 | ||
832 | 374 | >>> buildlog_lp_url_without_ppa_name = buildlog_lp_url.replace( | 385 | >>> buildlog_lp_url_without_ppa_name = buildlog_lp_url.replace( |
834 | 375 | ... '/ppa', '') | 386 | ... '/p3a', '') |
835 | 376 | >>> print buildlog_lp_url_without_ppa_name | 387 | >>> print buildlog_lp_url_without_ppa_name |
836 | 377 | http://.../~no-priv/+archive/+build/31/+files/... | 388 | http://.../~no-priv/+archive/+build/31/+files/... |
837 | 378 | 389 | ||
838 | 379 | 390 | ||
839 | === modified file 'lib/lp/soyuz/tests/test_publishing.py' | |||
840 | --- lib/lp/soyuz/tests/test_publishing.py 2010-02-23 11:53:08 +0000 | |||
841 | +++ lib/lp/soyuz/tests/test_publishing.py 2010-02-26 15:38:20 +0000 | |||
842 | @@ -263,9 +263,8 @@ | |||
843 | 263 | pocket=PackagePublishingPocket.RELEASE, | 263 | pocket=PackagePublishingPocket.RELEASE, |
844 | 264 | format=BinaryPackageFormat.DEB, | 264 | format=BinaryPackageFormat.DEB, |
845 | 265 | scheduleddeletiondate=None, dateremoved=None, | 265 | scheduleddeletiondate=None, dateremoved=None, |
849 | 266 | distroseries=None, | 266 | distroseries=None, archive=None, |
850 | 267 | archive=None, | 267 | pub_source=None, builder=None): |
848 | 268 | pub_source=None): | ||
851 | 269 | """Return a list of binary publishing records.""" | 268 | """Return a list of binary publishing records.""" |
852 | 270 | if distroseries is None: | 269 | if distroseries is None: |
853 | 271 | distroseries = self.distroseries | 270 | distroseries = self.distroseries |
854 | @@ -284,6 +283,7 @@ | |||
855 | 284 | builds = pub_source.createMissingBuilds() | 283 | builds = pub_source.createMissingBuilds() |
856 | 285 | published_binaries = [] | 284 | published_binaries = [] |
857 | 286 | for build in builds: | 285 | for build in builds: |
858 | 286 | build.builder = builder | ||
859 | 287 | binarypackagerelease = self.uploadBinaryForBuild( | 287 | binarypackagerelease = self.uploadBinaryForBuild( |
860 | 288 | build, binaryname, filecontent, summary, description, | 288 | build, binaryname, filecontent, summary, description, |
861 | 289 | shlibdep, depends, recommends, suggests, conflicts, replaces, | 289 | shlibdep, depends, recommends, suggests, conflicts, replaces, |
862 | 290 | 290 | ||
863 | === modified file 'lib/lp/testing/factory.py' | |||
864 | --- lib/lp/testing/factory.py 2010-02-26 15:38:18 +0000 | |||
865 | +++ lib/lp/testing/factory.py 2010-02-26 15:38:20 +0000 | |||
866 | @@ -1559,7 +1559,7 @@ | |||
867 | 1559 | 1559 | ||
868 | 1560 | def makeArchive(self, distribution=None, owner=None, name=None, | 1560 | def makeArchive(self, distribution=None, owner=None, name=None, |
869 | 1561 | purpose=None, enabled=True, private=False, | 1561 | purpose=None, enabled=True, private=False, |
871 | 1562 | virtualized=True): | 1562 | virtualized=True, description=None): |
872 | 1563 | """Create and return a new arbitrary archive. | 1563 | """Create and return a new arbitrary archive. |
873 | 1564 | 1564 | ||
874 | 1565 | :param distribution: Supply IDistribution, defaults to a new one | 1565 | :param distribution: Supply IDistribution, defaults to a new one |
875 | @@ -1571,6 +1571,7 @@ | |||
876 | 1571 | :param enabled: Whether the archive is enabled. | 1571 | :param enabled: Whether the archive is enabled. |
877 | 1572 | :param private: Whether the archive is created private. | 1572 | :param private: Whether the archive is created private. |
878 | 1573 | :param virtualized: Whether the archive is virtualized. | 1573 | :param virtualized: Whether the archive is virtualized. |
879 | 1574 | :param description: A description of the archive. | ||
880 | 1574 | """ | 1575 | """ |
881 | 1575 | if distribution is None: | 1576 | if distribution is None: |
882 | 1576 | distribution = self.makeDistribution() | 1577 | distribution = self.makeDistribution() |
883 | @@ -1592,7 +1593,7 @@ | |||
884 | 1592 | archive = getUtility(IArchiveSet).new( | 1593 | archive = getUtility(IArchiveSet).new( |
885 | 1593 | owner=owner, purpose=purpose, | 1594 | owner=owner, purpose=purpose, |
886 | 1594 | distribution=distribution, name=name, enabled=enabled, | 1595 | distribution=distribution, name=name, enabled=enabled, |
888 | 1595 | require_virtualized=virtualized) | 1596 | require_virtualized=virtualized, description=description) |
889 | 1596 | 1597 | ||
890 | 1597 | if private: | 1598 | if private: |
891 | 1598 | archive.private = True | 1599 | archive.private = True |
This is the fourth branch in a series to refactor soyuz tests after fixing bug 506203.
The MP for the branch that actually fixed the bug is at:
https:/ /code.edge. launchpad. net/~michael. nelson/ launchpad/ 506203- ppa-privatisati on-check/ +merge/ 19415
The fix ensures that the privacy of a PPA cannot be altered once it has packages published. Unfortunately most of our test infrastructure does exactly that (switches the privacy to do a few tests and then switches it back).
The complete test breakages are as follows: pastebin. ubuntu. com/378292/
http://
This branch fixes:
bin/test -vv -t archiveauthtoke n.txt -t archivesubscrib er.txt -t doc/build.txt -t package-diff.txt -t sourcepackagere lease.txt -t xx-ppa-files.txt
Thanks.