Merge lp:~sinzui/launchpad/package-link-validation into lp:launchpad
- package-link-validation
- Merge into devel
Proposed by
Curtis Hovey
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/package-link-validation |
Merge into: | lp:launchpad |
Diff against target: |
972 lines 23 files modified
lib/canonical/launchpad/browser/__init__.py (+0/-1) lib/canonical/launchpad/database/__init__.py (+0/-1) lib/canonical/launchpad/interfaces/__init__.py (+0/-1) lib/canonical/launchpad/security.py (+1/-1) lib/canonical/launchpad/zcml/configure.zcml (+0/-1) lib/canonical/launchpad/zcml/packaging.zcml (+0/-32) lib/lp/bugs/doc/distribution-upstream-bug-report.txt (+40/-29) lib/lp/registry/browser/configure.zcml (+1/-1) lib/lp/registry/browser/distributionsourcepackage.py (+1/-1) lib/lp/registry/browser/packaging.py (+1/-1) lib/lp/registry/browser/sourcepackage.py (+1/-1) lib/lp/registry/browser/tests/test_packaging.py (+4/-2) lib/lp/registry/browser/tests/test_person_view.py (+2/-1) lib/lp/registry/configure.zcml (+23/-0) lib/lp/registry/doc/sourcepackage.txt (+94/-59) lib/lp/registry/model/distribution.py (+1/-1) lib/lp/registry/model/distroseries.py (+2/-2) lib/lp/registry/model/packaging.py (+2/-2) lib/lp/registry/model/product.py (+2/-2) lib/lp/registry/model/productseries.py (+2/-2) lib/lp/registry/model/sourcepackage.py (+3/-3) lib/lp/registry/tests/test_packaging.py (+4/-2) utilities/migrater/migrater.py (+5/-3) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/package-link-validation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+13484@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote : | # |
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/canonical/launchpad/browser/__init__.py' | |||
2 | --- lib/canonical/launchpad/browser/__init__.py 2009-08-31 13:18:00 +0000 | |||
3 | +++ lib/canonical/launchpad/browser/__init__.py 2009-10-16 20:36:17 +0000 | |||
4 | @@ -48,7 +48,6 @@ | |||
5 | 48 | from canonical.launchpad.browser.oauth import * | 48 | from canonical.launchpad.browser.oauth import * |
6 | 49 | from canonical.launchpad.browser.objectreassignment import * | 49 | from canonical.launchpad.browser.objectreassignment import * |
7 | 50 | from canonical.launchpad.browser.packagerelationship import * | 50 | from canonical.launchpad.browser.packagerelationship import * |
8 | 51 | from canonical.launchpad.browser.packaging import * | ||
9 | 52 | from lp.registry.browser.peoplemerge import * | 51 | from lp.registry.browser.peoplemerge import * |
10 | 53 | from lp.registry.browser.poll import * | 52 | from lp.registry.browser.poll import * |
11 | 54 | from lp.soyuz.browser.publishedpackage import * | 53 | from lp.soyuz.browser.publishedpackage import * |
12 | 55 | 54 | ||
13 | === modified file 'lib/canonical/launchpad/database/__init__.py' | |||
14 | --- lib/canonical/launchpad/database/__init__.py 2009-09-17 21:13:06 +0000 | |||
15 | +++ lib/canonical/launchpad/database/__init__.py 2009-10-16 20:36:17 +0000 | |||
16 | @@ -56,7 +56,6 @@ | |||
17 | 56 | 56 | ||
18 | 57 | from canonical.launchpad.database.account import * | 57 | from canonical.launchpad.database.account import * |
19 | 58 | from canonical.launchpad.database.personnotification import * | 58 | from canonical.launchpad.database.personnotification import * |
20 | 59 | from canonical.launchpad.database.packaging import * | ||
21 | 60 | from canonical.launchpad.database.librarian import * | 59 | from canonical.launchpad.database.librarian import * |
22 | 61 | from canonical.launchpad.database.binaryandsourcepackagename import * | 60 | from canonical.launchpad.database.binaryandsourcepackagename import * |
23 | 62 | from canonical.launchpad.database.message import * | 61 | from canonical.launchpad.database.message import * |
24 | 63 | 62 | ||
25 | === modified file 'lib/canonical/launchpad/interfaces/__init__.py' | |||
26 | --- lib/canonical/launchpad/interfaces/__init__.py 2009-08-27 07:05:16 +0000 | |||
27 | +++ lib/canonical/launchpad/interfaces/__init__.py 2009-10-16 20:36:17 +0000 | |||
28 | @@ -94,7 +94,6 @@ | |||
29 | 94 | from canonical.launchpad.interfaces.oauth import * | 94 | from canonical.launchpad.interfaces.oauth import * |
30 | 95 | from canonical.launchpad.interfaces.openidconsumer import * | 95 | from canonical.launchpad.interfaces.openidconsumer import * |
31 | 96 | from canonical.launchpad.interfaces.packagerelationship import * | 96 | from canonical.launchpad.interfaces.packagerelationship import * |
32 | 97 | from canonical.launchpad.interfaces.packaging import * | ||
33 | 98 | from canonical.launchpad.interfaces.pathlookup import * | 97 | from canonical.launchpad.interfaces.pathlookup import * |
34 | 99 | from lp.registry.interfaces.poll import * | 98 | from lp.registry.interfaces.poll import * |
35 | 100 | from lp.soyuz.interfaces.processor import * | 99 | from lp.soyuz.interfaces.processor import * |
36 | 101 | 100 | ||
37 | === modified file 'lib/canonical/launchpad/security.py' | |||
38 | --- lib/canonical/launchpad/security.py 2009-09-25 00:59:30 +0000 | |||
39 | +++ lib/canonical/launchpad/security.py 2009-10-16 20:36:17 +0000 | |||
40 | @@ -71,7 +71,7 @@ | |||
41 | 71 | IBinaryPackagePublishingHistory, ISourcePackagePublishingHistory) | 71 | IBinaryPackagePublishingHistory, ISourcePackagePublishingHistory) |
42 | 72 | from lp.soyuz.interfaces.queue import ( | 72 | from lp.soyuz.interfaces.queue import ( |
43 | 73 | IPackageUpload, IPackageUploadQueue) | 73 | IPackageUpload, IPackageUploadQueue) |
45 | 74 | from canonical.launchpad.interfaces.packaging import IPackaging | 74 | from lp.registry.interfaces.packaging import IPackaging |
46 | 75 | from lp.registry.interfaces.person import ( | 75 | from lp.registry.interfaces.person import ( |
47 | 76 | IPerson, ITeam, PersonVisibility) | 76 | IPerson, ITeam, PersonVisibility) |
48 | 77 | from lp.registry.interfaces.pillar import IPillar | 77 | from lp.registry.interfaces.pillar import IPillar |
49 | 78 | 78 | ||
50 | === modified file 'lib/canonical/launchpad/zcml/configure.zcml' | |||
51 | --- lib/canonical/launchpad/zcml/configure.zcml 2009-08-27 07:05:16 +0000 | |||
52 | +++ lib/canonical/launchpad/zcml/configure.zcml 2009-10-16 20:36:17 +0000 | |||
53 | @@ -29,7 +29,6 @@ | |||
54 | 29 | <include file="openidconsumer.zcml" /> | 29 | <include file="openidconsumer.zcml" /> |
55 | 30 | <include file="packagecopyrequest.zcml" /> | 30 | <include file="packagecopyrequest.zcml" /> |
56 | 31 | <include file="packagerelationship.zcml" /> | 31 | <include file="packagerelationship.zcml" /> |
57 | 32 | <include file="packaging.zcml" /> | ||
58 | 33 | <include file="personnotification.zcml" /> | 32 | <include file="personnotification.zcml" /> |
59 | 34 | <include file="personproduct.zcml" /> | 33 | <include file="personproduct.zcml" /> |
60 | 35 | <include file="structuralsubscription.zcml" /> | 34 | <include file="structuralsubscription.zcml" /> |
61 | 36 | 35 | ||
62 | === removed file 'lib/canonical/launchpad/zcml/packaging.zcml' | |||
63 | --- lib/canonical/launchpad/zcml/packaging.zcml 2009-07-13 18:15:02 +0000 | |||
64 | +++ lib/canonical/launchpad/zcml/packaging.zcml 1970-01-01 00:00:00 +0000 | |||
65 | @@ -1,32 +0,0 @@ | |||
66 | 1 | <!-- Copyright 2009 Canonical Ltd. This software is licensed under the | ||
67 | 2 | GNU Affero General Public License version 3 (see the file LICENSE). | ||
68 | 3 | --> | ||
69 | 4 | |||
70 | 5 | <configure | ||
71 | 6 | xmlns="http://namespaces.zope.org/zope" | ||
72 | 7 | xmlns:browser="http://namespaces.zope.org/browser" | ||
73 | 8 | xmlns:i18n="http://namespaces.zope.org/i18n" | ||
74 | 9 | xmlns:zope="http://namespaces.zope.org/zope" | ||
75 | 10 | i18n:domain="launchpad"> | ||
76 | 11 | |||
77 | 12 | <!-- Packaging --> | ||
78 | 13 | <class class="canonical.launchpad.database.Packaging"> | ||
79 | 14 | <allow interface="canonical.launchpad.interfaces.IPackaging" /> | ||
80 | 15 | <require | ||
81 | 16 | permission="zope.Public" | ||
82 | 17 | set_schema="canonical.launchpad.interfaces.IPackaging" | ||
83 | 18 | /> | ||
84 | 19 | </class> | ||
85 | 20 | |||
86 | 21 | <!-- PackagingUtil --> | ||
87 | 22 | <class class="canonical.launchpad.database.PackagingUtil"> | ||
88 | 23 | <allow interface="canonical.launchpad.interfaces.IPackagingUtil" /> | ||
89 | 24 | </class> | ||
90 | 25 | |||
91 | 26 | <securedutility | ||
92 | 27 | class="canonical.launchpad.database.PackagingUtil" | ||
93 | 28 | provides="canonical.launchpad.interfaces.IPackagingUtil"> | ||
94 | 29 | <allow interface="canonical.launchpad.interfaces.IPackagingUtil" /> | ||
95 | 30 | </securedutility> | ||
96 | 31 | |||
97 | 32 | </configure> | ||
98 | 33 | 0 | ||
99 | === modified file 'lib/lp/bugs/doc/distribution-upstream-bug-report.txt' | |||
100 | --- lib/lp/bugs/doc/distribution-upstream-bug-report.txt 2009-08-13 15:12:16 +0000 | |||
101 | +++ lib/lp/bugs/doc/distribution-upstream-bug-report.txt 2009-10-16 20:36:17 +0000 | |||
102 | @@ -1,19 +1,24 @@ | |||
104 | 1 | = Upstream Bug reports = | 1 | Upstream Bug reports |
105 | 2 | ==================== | ||
106 | 2 | 3 | ||
107 | 3 | For a distribution's bug tracking process to be successful, it's vital | 4 | For a distribution's bug tracking process to be successful, it's vital |
108 | 4 | that it is able to communicate upstream bugs to the relevant upstream | 5 | that it is able to communicate upstream bugs to the relevant upstream |
109 | 5 | project and monitor them as they change. Launchpad offers functionality | 6 | project and monitor them as they change. Launchpad offers functionality |
110 | 6 | to allow a distribution to focus on and improve this process. | 7 | to allow a distribution to focus on and improve this process. |
111 | 7 | 8 | ||
112 | 8 | |||
113 | 9 | >>> from canonical.launchpad.ftests import login | 9 | >>> from canonical.launchpad.ftests import login |
114 | 10 | >>> from lp.bugs.tests.bug import ( | 10 | >>> from lp.bugs.tests.bug import ( |
115 | 11 | ... create_bug_from_strings) | 11 | ... create_bug_from_strings) |
116 | 12 | >>> from canonical.launchpad.ftests import sync | 12 | >>> from canonical.launchpad.ftests import sync |
121 | 13 | >>> from canonical.launchpad.interfaces import ( | 13 | >>> from lp.registry.interfaces.sourcepackagename import ( |
122 | 14 | ... ISourcePackageNameSet, IDistributionSet, IProductSet, | 14 | ... ISourcePackageNameSet) |
123 | 15 | ... IPackagingUtil, IPersonSet, PackagingType, IBugTaskSet, | 15 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
124 | 16 | ... IBugWatchSet, BugTaskStatus) | 16 | >>> from lp.registry.interfaces.product import IProductSet |
125 | 17 | >>> from lp.registry.interfaces.packaging import ( | ||
126 | 18 | ... IPackagingUtil, PackagingType) | ||
127 | 19 | >>> from lp.registry.interfaces.person import IPersonSet | ||
128 | 20 | >>> from lp.bugs.interfaces.bugtask import IBugTaskSet, BugTaskStatus | ||
129 | 21 | >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet | ||
130 | 17 | 22 | ||
131 | 18 | >>> distroset = getUtility(IDistributionSet) | 23 | >>> distroset = getUtility(IDistributionSet) |
132 | 19 | >>> ubuntu = distroset.getByName('ubuntu') | 24 | >>> ubuntu = distroset.getByName('ubuntu') |
133 | @@ -21,7 +26,8 @@ | |||
134 | 21 | >>> kubuntu = distroset.getByName('kubuntu') | 26 | >>> kubuntu = distroset.getByName('kubuntu') |
135 | 22 | 27 | ||
136 | 23 | 28 | ||
138 | 24 | == The API == | 29 | The API |
139 | 30 | ------- | ||
140 | 25 | 31 | ||
141 | 26 | IDistribution has a special API that allows you to assemble data for a | 32 | IDistribution has a special API that allows you to assemble data for a |
142 | 27 | bug report that associates packages with upstream information linked to | 33 | bug report that associates packages with upstream information linked to |
143 | @@ -87,11 +93,11 @@ | |||
144 | 87 | thunderbird None 1 1 1 1 | 93 | thunderbird None 1 1 1 1 |
145 | 88 | 94 | ||
146 | 89 | We add two new bugs to pmount in Ubuntu. From now on we'll limit the | 95 | We add two new bugs to pmount in Ubuntu. From now on we'll limit the |
149 | 90 | results to 3 packages (as a demonstration of the API) so thunderbird will be | 96 | results to 3 packages (as a demonstration of the API) so thunderbird |
150 | 91 | popped off the list: | 97 | will be popped off the list: |
151 | 92 | 98 | ||
152 | 93 | >>> bug = create_bug_from_strings(distribution='ubuntu', | 99 | >>> bug = create_bug_from_strings(distribution='ubuntu', |
154 | 94 | ... sourcepackagename='pmount', owner='name12', | 100 | ... sourcepackagename='pmount', owner='name12', |
155 | 95 | ... summary='pmount used to work', description='fix it', | 101 | ... summary='pmount used to work', description='fix it', |
156 | 96 | ... status=BugTaskStatus.TRIAGED) | 102 | ... status=BugTaskStatus.TRIAGED) |
157 | 97 | >>> bug = create_bug_from_strings(distribution='ubuntu', | 103 | >>> bug = create_bug_from_strings(distribution='ubuntu', |
158 | @@ -141,7 +147,8 @@ | |||
159 | 141 | mozilla-firefox firefox 1 1 1 1 | 147 | mozilla-firefox firefox 1 1 1 1 |
160 | 142 | 148 | ||
161 | 143 | 149 | ||
163 | 144 | == Properties of BugReportData == | 150 | Properties of BugReportData |
164 | 151 | --------------------------- | ||
165 | 145 | 152 | ||
166 | 146 | The API listed above is based around BugReportData instances, each of | 153 | The API listed above is based around BugReportData instances, each of |
167 | 147 | which offers a set of properties that can be used to accessed data. Each | 154 | which offers a set of properties that can be used to accessed data. Each |
168 | @@ -156,7 +163,8 @@ | |||
169 | 156 | ... watched_bugs=60) | 163 | ... watched_bugs=60) |
170 | 157 | 164 | ||
171 | 158 | 165 | ||
173 | 159 | === Percentages === | 166 | Percentages |
174 | 167 | ........... | ||
175 | 160 | 168 | ||
176 | 161 | BugReportData offers a set of *_percentage properties. | 169 | BugReportData offers a set of *_percentage properties. |
177 | 162 | 170 | ||
178 | @@ -179,7 +187,8 @@ | |||
179 | 179 | 85.714285714285708 | 187 | 85.714285714285708 |
180 | 180 | 188 | ||
181 | 181 | 189 | ||
183 | 182 | === Deltas === | 190 | Deltas |
184 | 191 | ...... | ||
185 | 183 | 192 | ||
186 | 184 | BugReportData also offers a set of of *_delta properties along with the | 193 | BugReportData also offers a set of of *_delta properties along with the |
187 | 185 | *_percentage properties. | 194 | *_percentage properties. |
188 | @@ -190,8 +199,8 @@ | |||
189 | 190 | >>> bug_data.triaged_bugs_delta | 199 | >>> bug_data.triaged_bugs_delta |
190 | 191 | 40 | 200 | 40 |
191 | 192 | 201 | ||
194 | 193 | BugReportData.upstream bugs_delta is the difference between the number of | 202 | BugReportData.upstream bugs_delta is the difference between the number |
195 | 194 | open bugs and the number of bugs forwarded upstream. | 203 | of open bugs and the number of bugs forwarded upstream. |
196 | 195 | 204 | ||
197 | 196 | >>> bug_data.upstream_bugs_delta | 205 | >>> bug_data.upstream_bugs_delta |
198 | 197 | 20 | 206 | 20 |
199 | @@ -204,12 +213,13 @@ | |||
200 | 204 | 10 | 213 | 10 |
201 | 205 | 214 | ||
202 | 206 | 215 | ||
204 | 207 | === Classes === | 216 | Classes |
205 | 217 | ....... | ||
206 | 208 | 218 | ||
211 | 209 | Finally, BugReportData offers a set of *_class properties. These | 219 | Finally, BugReportData offers a set of *_class properties. These provide |
212 | 210 | provide the correct CSS class to use for rendering the data in a table. | 220 | the correct CSS class to use for rendering the data in a table. They |
213 | 211 | They return 'good' if the property that they represent is above a | 221 | return 'good' if the property that they represent is above a certain |
214 | 212 | certain threshold or an empty string if not. | 222 | threshold or an empty string if not. |
215 | 213 | 223 | ||
216 | 214 | BugReportData.triaged_bugs_class returns 'good' if the | 224 | BugReportData.triaged_bugs_class returns 'good' if the |
217 | 215 | triaged_bugs_percentage is greater than BugReportData.TRIAGED_THRESHOLD. | 225 | triaged_bugs_percentage is greater than BugReportData.TRIAGED_THRESHOLD. |
218 | @@ -295,7 +305,8 @@ | |||
219 | 295 | '' | 305 | '' |
220 | 296 | 306 | ||
221 | 297 | 307 | ||
223 | 298 | == The view == | 308 | The view |
224 | 309 | -------- | ||
225 | 299 | 310 | ||
226 | 300 | We test that the view data is constructed sanely and without any hidden | 311 | We test that the view data is constructed sanely and without any hidden |
227 | 301 | defects. Let's set up some helpers to make it easier for us to output | 312 | defects. Let's set up some helpers to make it easier for us to output |
228 | @@ -358,9 +369,9 @@ | |||
229 | 358 | NO PRODUCT | 369 | NO PRODUCT |
230 | 359 | NO URL | 370 | NO URL |
231 | 360 | NO URL | 371 | NO URL |
235 | 361 | **linux-source-2.6.15/+bugs?search=Search&field.status_upstream=open_upstream | 372 | **linux-source-2.6.15/+bugs?...&field.status_upstream=open_upstream |
236 | 362 | **linux-source-2.6.15/+bugs?search=Search&field.status_upstream=hide_upstream | 373 | **linux-source-2.6.15/+bugs?...h&field.status_upstream=hide_upstream |
237 | 363 | **linux-source-2.6.15/+bugs?search=Search&field.status_upstream=pending_bugwatch | 374 | **linux-source-2.6.15/+bugs?...&field.status_upstream=pending_bugwatch |
238 | 364 | -- | 375 | -- |
239 | 365 | mozilla-firefox ubuntu hoary | 376 | mozilla-firefox ubuntu hoary |
240 | 366 | firefox | 377 | firefox |
241 | @@ -368,7 +379,7 @@ | |||
242 | 368 | http://launchpad.dev/firefox/+edit | 379 | http://launchpad.dev/firefox/+edit |
243 | 369 | **mozilla-firefox/+bugs?search=Search&field.status_upstream=open_upstream | 380 | **mozilla-firefox/+bugs?search=Search&field.status_upstream=open_upstream |
244 | 370 | **mozilla-firefox/+bugs?search=Search&field.status_upstream=hide_upstream | 381 | **mozilla-firefox/+bugs?search=Search&field.status_upstream=hide_upstream |
246 | 371 | **mozilla-firefox/+bugs?search=Search&field.status_upstream=pending_bugwatch | 382 | **mozilla-firefox/+bugs?...&field.status_upstream=pending_bugwatch |
247 | 372 | -- | 383 | -- |
248 | 373 | thunderbird ubuntu hoary | 384 | thunderbird ubuntu hoary |
249 | 374 | NO PRODUCT | 385 | NO PRODUCT |
250 | @@ -410,7 +421,8 @@ | |||
251 | 410 | 0 0 0 0 0.0 0.0 0.0 0 0 0 | 421 | 0 0 0 0 0.0 0.0 0.0 0 0 0 |
252 | 411 | 422 | ||
253 | 412 | 423 | ||
255 | 413 | == Sorting the report == | 424 | Sorting the report |
256 | 425 | ------------------ | ||
257 | 414 | 426 | ||
258 | 415 | The upstream report is sortable by each of the columns displayed. We'll | 427 | The upstream report is sortable by each of the columns displayed. We'll |
259 | 416 | demonstrate this using the Ubuntu report. | 428 | demonstrate this using the Ubuntu report. |
260 | @@ -552,6 +564,5 @@ | |||
261 | 552 | bug_supervisor_name /@@/arrowBlank | 564 | bug_supervisor_name /@@/arrowBlank |
262 | 553 | bugtracker_name /@@/arrowDown... | 565 | bugtracker_name /@@/arrowDown... |
263 | 554 | 566 | ||
267 | 555 | PS: This page is actually browser-tested in | 567 | PS: This page is actually browser-tested in pagetests.distribution- |
268 | 556 | pagetests.distribution-upstream-bug-report. Look there for more details. | 568 | upstream-bug-report. Look there for more details. |
266 | 557 | |||
269 | 558 | 569 | ||
270 | === modified file 'lib/lp/registry/browser/configure.zcml' | |||
271 | --- lib/lp/registry/browser/configure.zcml 2009-10-09 17:18:38 +0000 | |||
272 | +++ lib/lp/registry/browser/configure.zcml 2009-10-16 20:36:17 +0000 | |||
273 | @@ -1647,7 +1647,7 @@ | |||
274 | 1647 | <browser:page | 1647 | <browser:page |
275 | 1648 | name="+addpackage" | 1648 | name="+addpackage" |
276 | 1649 | for="lp.registry.interfaces.productseries.IProductSeries" | 1649 | for="lp.registry.interfaces.productseries.IProductSeries" |
278 | 1650 | class="canonical.launchpad.browser.PackagingAddView" | 1650 | class="lp.registry.browser.packaging.PackagingAddView" |
279 | 1651 | facet="overview" | 1651 | facet="overview" |
280 | 1652 | permission="launchpad.Edit" | 1652 | permission="launchpad.Edit" |
281 | 1653 | template="../templates/productseries-packaging.pt"/> | 1653 | template="../templates/productseries-packaging.pt"/> |
282 | 1654 | 1654 | ||
283 | === modified file 'lib/lp/registry/browser/distributionsourcepackage.py' | |||
284 | --- lib/lp/registry/browser/distributionsourcepackage.py 2009-09-25 17:00:20 +0000 | |||
285 | +++ lib/lp/registry/browser/distributionsourcepackage.py 2009-10-16 20:36:17 +0000 | |||
286 | @@ -32,7 +32,7 @@ | |||
287 | 32 | from lp.soyuz.interfaces.distributionsourcepackagerelease import ( | 32 | from lp.soyuz.interfaces.distributionsourcepackagerelease import ( |
288 | 33 | IDistributionSourcePackageRelease) | 33 | IDistributionSourcePackageRelease) |
289 | 34 | from lp.soyuz.interfaces.packagediff import IPackageDiffSet | 34 | from lp.soyuz.interfaces.packagediff import IPackageDiffSet |
291 | 35 | from canonical.launchpad.interfaces.packaging import IPackagingUtil | 35 | from lp.registry.interfaces.packaging import IPackagingUtil |
292 | 36 | from lp.registry.interfaces.pocket import pocketsuffix | 36 | from lp.registry.interfaces.pocket import pocketsuffix |
293 | 37 | from lp.registry.interfaces.product import IDistributionSourcePackage | 37 | from lp.registry.interfaces.product import IDistributionSourcePackage |
294 | 38 | from lp.bugs.browser.bugtask import BugTargetTraversalMixin | 38 | from lp.bugs.browser.bugtask import BugTargetTraversalMixin |
295 | 39 | 39 | ||
296 | === renamed file 'lib/canonical/launchpad/browser/packaging.py' => 'lib/lp/registry/browser/packaging.py' | |||
297 | --- lib/canonical/launchpad/browser/packaging.py 2009-09-12 06:11:08 +0000 | |||
298 | +++ lib/lp/registry/browser/packaging.py 2009-10-16 20:36:17 +0000 | |||
299 | @@ -10,7 +10,7 @@ | |||
300 | 10 | from zope.component import getUtility | 10 | from zope.component import getUtility |
301 | 11 | 11 | ||
302 | 12 | from canonical.launchpad import _ | 12 | from canonical.launchpad import _ |
304 | 13 | from canonical.launchpad.interfaces.packaging import ( | 13 | from lp.registry.interfaces.packaging import ( |
305 | 14 | IPackaging, IPackagingUtil) | 14 | IPackaging, IPackagingUtil) |
306 | 15 | from canonical.launchpad.webapp import canonical_url | 15 | from canonical.launchpad.webapp import canonical_url |
307 | 16 | from canonical.launchpad.webapp.launchpadform import action, LaunchpadFormView | 16 | from canonical.launchpad.webapp.launchpadform import action, LaunchpadFormView |
308 | 17 | 17 | ||
309 | === modified file 'lib/lp/registry/browser/sourcepackage.py' | |||
310 | --- lib/lp/registry/browser/sourcepackage.py 2009-09-25 17:00:20 +0000 | |||
311 | +++ lib/lp/registry/browser/sourcepackage.py 2009-10-16 20:36:17 +0000 | |||
312 | @@ -26,7 +26,7 @@ | |||
313 | 26 | from lp.answers.browser.questiontarget import ( | 26 | from lp.answers.browser.questiontarget import ( |
314 | 27 | QuestionTargetFacetMixin, QuestionTargetAnswersMenu) | 27 | QuestionTargetFacetMixin, QuestionTargetAnswersMenu) |
315 | 28 | from lp.services.worlddata.interfaces.country import ICountry | 28 | from lp.services.worlddata.interfaces.country import ICountry |
317 | 29 | from canonical.launchpad.interfaces.packaging import IPackaging | 29 | from lp.registry.interfaces.packaging import IPackaging |
318 | 30 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 30 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
319 | 31 | from lp.registry.interfaces.sourcepackage import ISourcePackage | 31 | from lp.registry.interfaces.sourcepackage import ISourcePackage |
320 | 32 | from lp.translations.interfaces.potemplate import IPOTemplateSet | 32 | from lp.translations.interfaces.potemplate import IPOTemplateSet |
321 | 33 | 33 | ||
322 | === renamed file 'lib/canonical/launchpad/browser/tests/test_packaging.py' => 'lib/lp/registry/browser/tests/test_packaging.py' | |||
323 | --- lib/canonical/launchpad/browser/tests/test_packaging.py 2009-06-25 05:30:52 +0000 | |||
324 | +++ lib/lp/registry/browser/tests/test_packaging.py 2009-10-16 20:36:17 +0000 | |||
325 | @@ -9,8 +9,10 @@ | |||
326 | 9 | 9 | ||
327 | 10 | from zope.component import getUtility | 10 | from zope.component import getUtility |
328 | 11 | 11 | ||
331 | 12 | from canonical.launchpad.interfaces import ( | 12 | from lp.registry.interfaces.distribution import IDistributionSet |
332 | 13 | IDistributionSet, IProductSet, ISourcePackageNameSet, IPackagingUtil) | 13 | from lp.registry.interfaces.packaging import IPackagingUtil |
333 | 14 | from lp.registry.interfaces.product import IProductSet | ||
334 | 15 | from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet | ||
335 | 14 | from canonical.launchpad.ftests import login, logout | 16 | from canonical.launchpad.ftests import login, logout |
336 | 15 | from canonical.launchpad.testing.pages import setupBrowser | 17 | from canonical.launchpad.testing.pages import setupBrowser |
337 | 16 | from canonical.testing import PageTestLayer | 18 | from canonical.testing import PageTestLayer |
338 | 17 | 19 | ||
339 | === modified file 'lib/lp/registry/browser/tests/test_person_view.py' | |||
340 | --- lib/lp/registry/browser/tests/test_person_view.py 2009-09-19 11:46:50 +0000 | |||
341 | +++ lib/lp/registry/browser/tests/test_person_view.py 2009-10-16 20:36:17 +0000 | |||
342 | @@ -7,7 +7,8 @@ | |||
343 | 7 | 7 | ||
344 | 8 | from zope.component import getUtility | 8 | from zope.component import getUtility |
345 | 9 | 9 | ||
347 | 10 | from canonical.launchpad.interfaces import IKarmaCacheManager, NotFoundError | 10 | from canonical.launchpad.webapp.interfaces import NotFoundError |
348 | 11 | from lp.registry.interfaces.karma import IKarmaCacheManager | ||
349 | 11 | from canonical.launchpad.webapp.servers import LaunchpadTestRequest | 12 | from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
350 | 12 | from canonical.testing import LaunchpadZopelessLayer | 13 | from canonical.testing import LaunchpadZopelessLayer |
351 | 13 | from lp.registry.browser.person import PersonView | 14 | from lp.registry.browser.person import PersonView |
352 | 14 | 15 | ||
353 | === modified file 'lib/lp/registry/configure.zcml' | |||
354 | --- lib/lp/registry/configure.zcml 2009-09-10 10:27:20 +0000 | |||
355 | +++ lib/lp/registry/configure.zcml 2009-10-16 20:36:17 +0000 | |||
356 | @@ -1641,4 +1641,27 @@ | |||
357 | 1641 | <allow | 1641 | <allow |
358 | 1642 | interface="lp.registry.interfaces.mentoringoffer.IMentoringOfferSet"/> | 1642 | interface="lp.registry.interfaces.mentoringoffer.IMentoringOfferSet"/> |
359 | 1643 | </securedutility> | 1643 | </securedutility> |
360 | 1644 | |||
361 | 1645 | <!-- Packaging --> | ||
362 | 1646 | <class | ||
363 | 1647 | class="lp.registry.model.packaging.Packaging"> | ||
364 | 1648 | <allow | ||
365 | 1649 | interface="lp.registry.interfaces.packaging.IPackaging"/> | ||
366 | 1650 | <require | ||
367 | 1651 | permission="zope.Public" | ||
368 | 1652 | set_schema="lp.registry.interfaces.packaging.IPackaging"/> | ||
369 | 1653 | </class> | ||
370 | 1654 | |||
371 | 1655 | <!-- PackagingUtil --> | ||
372 | 1656 | <class | ||
373 | 1657 | class="lp.registry.model.packaging.PackagingUtil"> | ||
374 | 1658 | <allow | ||
375 | 1659 | interface="lp.registry.interfaces.packaging.IPackagingUtil"/> | ||
376 | 1660 | </class> | ||
377 | 1661 | <securedutility | ||
378 | 1662 | class="lp.registry.model.packaging.PackagingUtil" | ||
379 | 1663 | provides="lp.registry.interfaces.packaging.IPackagingUtil"> | ||
380 | 1664 | <allow | ||
381 | 1665 | interface="lp.registry.interfaces.packaging.IPackagingUtil"/> | ||
382 | 1666 | </securedutility> | ||
383 | 1644 | </configure> | 1667 | </configure> |
384 | 1645 | 1668 | ||
385 | === modified file 'lib/lp/registry/doc/sourcepackage.txt' | |||
386 | --- lib/lp/registry/doc/sourcepackage.txt 2009-09-19 08:14:43 +0000 | |||
387 | +++ lib/lp/registry/doc/sourcepackage.txt 2009-10-16 20:36:17 +0000 | |||
388 | @@ -1,19 +1,22 @@ | |||
405 | 1 | = Source Packages = | 1 | Source Packages |
406 | 2 | 2 | =============== | |
407 | 3 | A source package is a thing from which binary packages are built, to then be | 3 | |
408 | 4 | installed using a package management tool like apt-get or rpm. One named source | 4 | A source package is a thing from which binary packages are built, to |
409 | 5 | package in a distro may be used to build several different named binary | 5 | then be installed using a package management tool like apt-get or rpm. |
410 | 6 | packages, on one or more architectures. One named binary package in a distro | 6 | One named source package in a distro may be used to build several |
411 | 7 | may have been built from more than one named source package (e.g. a different | 7 | different named binary packages, on one or more architectures. One named |
412 | 8 | source package may have been used to build "foo" on i386 vs. "foo" on ppc.) | 8 | binary package in a distro may have been built from more than one named |
413 | 9 | 9 | source package (e.g. a different source package may have been used to | |
414 | 10 | 10 | build "foo" on i386 vs. "foo" on ppc.) | |
415 | 11 | == Named Source Package == | 11 | |
416 | 12 | 12 | ||
417 | 13 | The are various metadata we're interested in collecting about a bundle of code | 13 | Named Source Package |
418 | 14 | used to build binary packages for installation in a particular distro series. | 14 | -------------------- |
419 | 15 | One such thing is the name of that bundle of code. This is abstracted into a | 15 | |
420 | 16 | separate SourcePackageName table. | 16 | The are various metadata we're interested in collecting about a bundle |
421 | 17 | of code used to build binary packages for installation in a particular | ||
422 | 18 | distro series. One such thing is the name of that bundle of code. This | ||
423 | 19 | is abstracted into a separate SourcePackageName table. | ||
424 | 17 | 20 | ||
425 | 18 | Accessing source package names is done through the ISourcePackageNameSet | 21 | Accessing source package names is done through the ISourcePackageNameSet |
426 | 19 | utility. | 22 | utility. |
427 | @@ -21,10 +24,12 @@ | |||
428 | 21 | The ISourcePackageNameSet utility is accessed in the usual fashion: | 24 | The ISourcePackageNameSet utility is accessed in the usual fashion: |
429 | 22 | 25 | ||
430 | 23 | >>> from zope.component import getUtility | 26 | >>> from zope.component import getUtility |
432 | 24 | >>> from canonical.launchpad.interfaces import ISourcePackageNameSet | 27 | >>> from lp.registry.interfaces.sourcepackagename import ( |
433 | 28 | ... ISourcePackageNameSet) | ||
434 | 25 | >>> sourcepackagenameset = getUtility(ISourcePackageNameSet) | 29 | >>> sourcepackagenameset = getUtility(ISourcePackageNameSet) |
435 | 26 | 30 | ||
437 | 27 | To retrieve a specific source package name, use ISourcePackageNameSet.get: | 31 | To retrieve a specific source package name, use |
438 | 32 | ISourcePackageNameSet.get: | ||
439 | 28 | 33 | ||
440 | 29 | >>> firefox = sourcepackagenameset.get(1) | 34 | >>> firefox = sourcepackagenameset.get(1) |
441 | 30 | >>> print firefox.name | 35 | >>> print firefox.name |
442 | @@ -44,12 +49,13 @@ | |||
443 | 44 | None | 49 | None |
444 | 45 | 50 | ||
445 | 46 | 51 | ||
447 | 47 | === Latest published component === | 52 | Latest published component |
448 | 53 | .......................... | ||
449 | 48 | 54 | ||
450 | 49 | The 'latest_published_component' attribute indicates the component where | 55 | The 'latest_published_component' attribute indicates the component where |
451 | 50 | the package was last published. | 56 | the package was last published. |
452 | 51 | 57 | ||
454 | 52 | >>> from canonical.launchpad.interfaces import IDistributionSet | 58 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
455 | 53 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') | 59 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
456 | 54 | >>> ubuntu_warty = ubuntu.getSeries('warty') | 60 | >>> ubuntu_warty = ubuntu.getSeries('warty') |
457 | 55 | >>> firefox_warty = ubuntu_warty.getSourcePackage('mozilla-firefox') | 61 | >>> firefox_warty = ubuntu_warty.getSourcePackage('mozilla-firefox') |
458 | @@ -65,6 +71,7 @@ | |||
459 | 65 | 71 | ||
460 | 66 | # Remove the security proxy to access the non-public | 72 | # Remove the security proxy to access the non-public |
461 | 67 | # _getPublishingHistory method. | 73 | # _getPublishingHistory method. |
462 | 74 | |||
463 | 68 | >>> from zope.security.proxy import removeSecurityProxy | 75 | >>> from zope.security.proxy import removeSecurityProxy |
464 | 69 | >>> publishing_history = removeSecurityProxy( | 76 | >>> publishing_history = removeSecurityProxy( |
465 | 70 | ... firefox_warty)._getPublishingHistory() | 77 | ... firefox_warty)._getPublishingHistory() |
466 | @@ -82,6 +89,7 @@ | |||
467 | 82 | # SourcePackagePublishingHistory is just a view on | 89 | # SourcePackagePublishingHistory is just a view on |
468 | 83 | # SecureSourcePackagePublishingHistory with some rows removed, so need | 90 | # SecureSourcePackagePublishingHistory with some rows removed, so need |
469 | 84 | # to update the SecureSourcePackagePublishingHistory table. | 91 | # to update the SecureSourcePackagePublishingHistory table. |
470 | 92 | |||
471 | 85 | >>> latest_publishing = SecureSourcePackagePublishingHistory.get( | 93 | >>> latest_publishing = SecureSourcePackagePublishingHistory.get( |
472 | 86 | ... publishing_history[-1].id) | 94 | ... publishing_history[-1].id) |
473 | 87 | >>> universe = Component.byName('universe') | 95 | >>> universe = Component.byName('universe') |
474 | @@ -92,6 +100,7 @@ | |||
475 | 92 | >>> for release in firefox_warty.distinctreleases: | 100 | >>> for release in firefox_warty.distinctreleases: |
476 | 93 | ... print release.component.name | 101 | ... print release.component.name |
477 | 94 | main | 102 | main |
478 | 103 | |||
479 | 95 | >>> firefox_warty.latest_published_component.name | 104 | >>> firefox_warty.latest_published_component.name |
480 | 96 | u'universe' | 105 | u'universe' |
481 | 97 | 106 | ||
482 | @@ -131,11 +140,12 @@ | |||
483 | 131 | ... pmount_hoary['0.1-1'].publishing_history[0].id) | 140 | ... pmount_hoary['0.1-1'].publishing_history[0].id) |
484 | 132 | >>> secure_pub.datesuperseded is not None | 141 | >>> secure_pub.datesuperseded is not None |
485 | 133 | True | 142 | True |
486 | 143 | |||
487 | 134 | >>> secure_pub.dateremoved is None | 144 | >>> secure_pub.dateremoved is None |
488 | 135 | True | 145 | True |
489 | 136 | 146 | ||
492 | 137 | We will emulate disk-removal to ensure it will continue to be | 147 | We will emulate disk-removal to ensure it will continue to be reachable. |
493 | 138 | reachable. See bug #179028 for further information. | 148 | See bug #179028 for further information. |
494 | 139 | 149 | ||
495 | 140 | >>> from datetime import timedelta | 150 | >>> from datetime import timedelta |
496 | 141 | >>> secure_pub.dateremoved = secure_pub.datesuperseded + timedelta(days=1) | 151 | >>> secure_pub.dateremoved = secure_pub.datesuperseded + timedelta(days=1) |
497 | @@ -152,11 +162,12 @@ | |||
498 | 152 | >>> len(list(pmount_hoary.distinctreleases)) | 162 | >>> len(list(pmount_hoary.distinctreleases)) |
499 | 153 | 2 | 163 | 2 |
500 | 154 | 164 | ||
506 | 155 | We will leave the pmount_0.1-1 marked as 'removed from disk' because | 165 | We will leave the pmount_0.1-1 marked as 'removed from disk' because we |
507 | 156 | we do want it to affect the next test cases. | 166 | do want it to affect the next test cases. |
508 | 157 | 167 | ||
509 | 158 | 168 | ||
510 | 159 | == Distribution Source Packages == | 169 | Distribution Source Packages |
511 | 170 | ---------------------------- | ||
512 | 160 | 171 | ||
513 | 161 | In some cases it's useful to be able to refer to a source package at a | 172 | In some cases it's useful to be able to refer to a source package at a |
514 | 162 | distribution level, independent of any particular distroseries. For | 173 | distribution level, independent of any particular distroseries. For |
515 | @@ -167,20 +178,26 @@ | |||
516 | 167 | To retrieve a distribution source package, use the getSourcePackage | 178 | To retrieve a distribution source package, use the getSourcePackage |
517 | 168 | method on a distribution: | 179 | method on a distribution: |
518 | 169 | 180 | ||
521 | 170 | >>> from canonical.launchpad.interfaces import ( | 181 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
522 | 171 | ... IDistributionSet, IDistributionSourcePackage) | 182 | >>> from lp.registry.interfaces.distributionsourcepackage import ( |
523 | 183 | ... IDistributionSourcePackage) | ||
524 | 172 | >>> ubuntu = getUtility(IDistributionSet).get(1) | 184 | >>> ubuntu = getUtility(IDistributionSet).get(1) |
525 | 173 | >>> ubuntu_firefox = ubuntu.getSourcePackage(firefox) | 185 | >>> ubuntu_firefox = ubuntu.getSourcePackage(firefox) |
526 | 174 | >>> IDistributionSourcePackage.providedBy(ubuntu_firefox) | 186 | >>> IDistributionSourcePackage.providedBy(ubuntu_firefox) |
527 | 175 | True | 187 | True |
528 | 188 | |||
529 | 176 | >>> print ubuntu_firefox.name | 189 | >>> print ubuntu_firefox.name |
530 | 177 | mozilla-firefox | 190 | mozilla-firefox |
531 | 191 | |||
532 | 178 | >>> print ubuntu_firefox.title.encode('ascii', 'backslashreplace') | 192 | >>> print ubuntu_firefox.title.encode('ascii', 'backslashreplace') |
533 | 179 | \u201cmozilla-firefox\u201d package in Ubuntu | 193 | \u201cmozilla-firefox\u201d package in Ubuntu |
534 | 194 | |||
535 | 180 | >>> print ubuntu_firefox.displayname | 195 | >>> print ubuntu_firefox.displayname |
536 | 181 | mozilla-firefox in ubuntu | 196 | mozilla-firefox in ubuntu |
537 | 197 | |||
538 | 182 | >>> ubuntu_firefox.distribution == ubuntu | 198 | >>> ubuntu_firefox.distribution == ubuntu |
539 | 183 | True | 199 | True |
540 | 200 | |||
541 | 184 | >>> ubuntu_firefox.sourcepackagename == firefox | 201 | >>> ubuntu_firefox.sourcepackagename == firefox |
542 | 185 | True | 202 | True |
543 | 186 | 203 | ||
544 | @@ -192,24 +209,27 @@ | |||
545 | 192 | 209 | ||
546 | 193 | >>> ubuntu_firefox_also == ubuntu_firefox | 210 | >>> ubuntu_firefox_also == ubuntu_firefox |
547 | 194 | True | 211 | True |
548 | 212 | |||
549 | 195 | >>> ubuntu_firefox != debian_firefox | 213 | >>> ubuntu_firefox != debian_firefox |
550 | 196 | True | 214 | True |
551 | 197 | 215 | ||
552 | 198 | You can search for bugs in an IDistroSourcePackage using the | 216 | You can search for bugs in an IDistroSourcePackage using the |
553 | 199 | .searchTasks method: | 217 | .searchTasks method: |
554 | 200 | 218 | ||
556 | 201 | >>> from canonical.launchpad.interfaces import ( | 219 | >>> from lp.bugs.interfaces.bugtask import ( |
557 | 202 | ... BugTaskSearchParams, BugTaskStatus) | 220 | ... BugTaskSearchParams, BugTaskStatus) |
558 | 203 | >>> params = BugTaskSearchParams( | 221 | >>> params = BugTaskSearchParams( |
559 | 204 | ... status=BugTaskStatus.NEW, user=None) | 222 | ... status=BugTaskStatus.NEW, user=None) |
560 | 205 | >>> tasks = ubuntu_firefox.searchTasks(params) | 223 | >>> tasks = ubuntu_firefox.searchTasks(params) |
561 | 206 | >>> tasks.count() | 224 | >>> tasks.count() |
562 | 207 | 1 | 225 | 1 |
563 | 226 | |||
564 | 208 | >>> tasks[0].id | 227 | >>> tasks[0].id |
565 | 209 | 17 | 228 | 17 |
566 | 210 | 229 | ||
567 | 211 | 230 | ||
569 | 212 | == Packaging == | 231 | Packaging |
570 | 232 | --------- | ||
571 | 213 | 233 | ||
572 | 214 | Distribution packages are linked to upstream productseries through the | 234 | Distribution packages are linked to upstream productseries through the |
573 | 215 | packaging process. Here we test the code that links all of those. | 235 | packaging process. Here we test the code that links all of those. |
574 | @@ -230,7 +250,8 @@ | |||
575 | 230 | >>> sid = DistroSeries.get(8) | 250 | >>> sid = DistroSeries.get(8) |
576 | 231 | >>> g2k5 = DistroSeries.get(9) | 251 | >>> g2k5 = DistroSeries.get(9) |
577 | 232 | 252 | ||
579 | 233 | Now let's make sure that we can see a productseries for a source package. | 253 | Now let's make sure that we can see a productseries for a source |
580 | 254 | package. | ||
581 | 234 | 255 | ||
582 | 235 | >>> from lp.registry.model.sourcepackage import SourcePackage | 256 | >>> from lp.registry.model.sourcepackage import SourcePackage |
583 | 236 | >>> sp = SourcePackage(sourcepackagename=firefox, distroseries=hoary) | 257 | >>> sp = SourcePackage(sourcepackagename=firefox, distroseries=hoary) |
584 | @@ -239,9 +260,9 @@ | |||
585 | 239 | 260 | ||
586 | 240 | Now we make sure there is no Packaging data for a52dec in hoary. | 261 | Now we make sure there is no Packaging data for a52dec in hoary. |
587 | 241 | 262 | ||
589 | 242 | >>> from canonical.launchpad.database import PackagingUtil | 263 | >>> from lp.registry.model.packaging import PackagingUtil |
590 | 243 | >>> a52decsp = SourcePackage(sourcepackagename=a52dec, | 264 | >>> a52decsp = SourcePackage(sourcepackagename=a52dec, |
592 | 244 | ... distroseries=hoary) | 265 | ... distroseries=hoary) |
593 | 245 | >>> a52decsp.productseries.name | 266 | >>> a52decsp.productseries.name |
594 | 246 | u'trunk' | 267 | u'trunk' |
595 | 247 | 268 | ||
596 | @@ -265,9 +286,10 @@ | |||
597 | 265 | >>> a52decsp.productseries.product.name | 286 | >>> a52decsp.productseries.product.name |
598 | 266 | u'a52dec' | 287 | u'a52dec' |
599 | 267 | 288 | ||
603 | 268 | Similarly, we should be able to get the packaging information from a parent | 289 | Similarly, we should be able to get the packaging information from a |
604 | 269 | distroseries, on the basis that a derivative is highly unlikely to change | 290 | parent distroseries, on the basis that a derivative is highly unlikely |
605 | 270 | the packaging drastically without changing the name of the package. | 291 | to change the packaging drastically without changing the name of the |
606 | 292 | package. | ||
607 | 271 | 293 | ||
608 | 272 | First, show there is no packging data for a52dec in g2k5: | 294 | First, show there is no packging data for a52dec in g2k5: |
609 | 273 | 295 | ||
610 | @@ -275,7 +297,7 @@ | |||
611 | 275 | ... productseries=a52decsp.productseries, | 297 | ... productseries=a52decsp.productseries, |
612 | 276 | ... sourcepackagename=a52dec, | 298 | ... sourcepackagename=a52dec, |
613 | 277 | ... distroseries=g2k5) | 299 | ... distroseries=g2k5) |
615 | 278 | False | 300 | False |
616 | 279 | 301 | ||
617 | 280 | Now verify we still get a product for that source package | 302 | Now verify we still get a product for that source package |
618 | 281 | 303 | ||
619 | @@ -286,7 +308,7 @@ | |||
620 | 286 | And if we want to link that productseries to a source package in that | 308 | And if we want to link that productseries to a source package in that |
621 | 287 | distroseries | 309 | distroseries |
622 | 288 | 310 | ||
624 | 289 | >>> from canonical.launchpad.interfaces import PackagingType | 311 | >>> from lp.registry.interfaces.packaging import PackagingType |
625 | 290 | >>> from lp.registry.model.person import Person | 312 | >>> from lp.registry.model.person import Person |
626 | 291 | >>> foobar = Person.byName('name16') | 313 | >>> foobar = Person.byName('name16') |
627 | 292 | >>> PackagingUtil().createPackaging( | 314 | >>> PackagingUtil().createPackaging( |
628 | @@ -314,10 +336,9 @@ | |||
629 | 314 | ... distroseries=g2k5) | 336 | ... distroseries=g2k5) |
630 | 315 | False | 337 | False |
631 | 316 | 338 | ||
636 | 317 | Linkified changelogs are available through SourcePackageReleaseView: | 339 | Linkified changelogs are available through SourcePackageReleaseView: XXX |
637 | 318 | XXX julian 2007-09-17 | 340 | julian 2007-09-17 This is duplicating the page test. Instead it should |
638 | 319 | This is duplicating the page test. Instead it should be more like the bug | 341 | be more like the bug number linkification just below. |
635 | 320 | number linkification just below. | ||
639 | 321 | 342 | ||
640 | 322 | >>> from zope.component import queryMultiAdapter | 343 | >>> from zope.component import queryMultiAdapter |
641 | 323 | >>> from zope.publisher.browser import TestRequest | 344 | >>> from zope.publisher.browser import TestRequest |
642 | @@ -338,13 +359,13 @@ | |||
643 | 338 | * Fix debian (Debian #2000) | 359 | * Fix debian (Debian #2000) |
644 | 339 | * Fix warty (Warty Ubuntu #1) | 360 | * Fix warty (Warty Ubuntu #1) |
645 | 340 | <BLANKLINE> | 361 | <BLANKLINE> |
647 | 341 | -- Sample Person <email address hidden> Tue, 7 Feb 2006 12:10:08 +0300 | 362 | -- Sample Person <email address hidden> ... Feb 2006 12:10:08 +0300 |
648 | 342 | <BLANKLINE> | 363 | <BLANKLINE> |
649 | 343 | <BLANKLINE> | 364 | <BLANKLINE> |
650 | 344 | 365 | ||
654 | 345 | The view will linkify bug numbers of the format "LP: #number" in the changelog | 366 | The view will linkify bug numbers of the format "LP: #number" in the |
655 | 346 | if number is a valid bug ID (also see Soyuz page tests | 367 | changelog if number is a valid bug ID (also see Soyuz page tests 24 |
656 | 347 | 24-sourcepackage-changelog.txt). The changelog() method calls a method | 368 | -sourcepackage-changelog.txt). The changelog() method calls a method |
657 | 348 | _linkify_bug_numbers() to do this. | 369 | _linkify_bug_numbers() to do this. |
658 | 349 | 370 | ||
659 | 350 | Zero or more spaces may appear between the ":" and the "#". | 371 | Zero or more spaces may appear between the ":" and the "#". |
660 | @@ -378,7 +399,8 @@ | |||
661 | 378 | u'lp: <a href="/bugs/10" title="another test bug">#10</a>' | 399 | u'lp: <a href="/bugs/10" title="another test bug">#10</a>' |
662 | 379 | 400 | ||
663 | 380 | 401 | ||
665 | 381 | == Comparing Sourcepackages == | 402 | Comparing Sourcepackages |
666 | 403 | ------------------------ | ||
667 | 382 | 404 | ||
668 | 383 | Lastly, note that sourcepackages know how to compare to each other: | 405 | Lastly, note that sourcepackages know how to compare to each other: |
669 | 384 | 406 | ||
670 | @@ -391,8 +413,10 @@ | |||
671 | 391 | 413 | ||
672 | 392 | >>> hoary_firefox_one == hoary_firefox_two | 414 | >>> hoary_firefox_one == hoary_firefox_two |
673 | 393 | True | 415 | True |
674 | 416 | |||
675 | 394 | >>> hoary_firefox_one != warty_firefox | 417 | >>> hoary_firefox_one != warty_firefox |
676 | 395 | True | 418 | True |
677 | 419 | |||
678 | 396 | >>> hoary_firefox_one == warty_firefox | 420 | >>> hoary_firefox_one == warty_firefox |
679 | 397 | False | 421 | False |
680 | 398 | 422 | ||
681 | @@ -400,6 +424,7 @@ | |||
682 | 400 | 424 | ||
683 | 401 | >>> hash(hoary_firefox_one) == hash(hoary_firefox_two) | 425 | >>> hash(hoary_firefox_one) == hash(hoary_firefox_two) |
684 | 402 | True | 426 | True |
685 | 427 | |||
686 | 403 | >>> hash(hoary_firefox_one) != hash(warty_firefox) | 428 | >>> hash(hoary_firefox_one) != hash(warty_firefox) |
687 | 404 | True | 429 | True |
688 | 405 | 430 | ||
689 | @@ -408,26 +433,30 @@ | |||
690 | 408 | >>> a_map[warty_firefox] = 'warty' | 433 | >>> a_map[warty_firefox] = 'warty' |
691 | 409 | >>> a_map[hoary_firefox_two] | 434 | >>> a_map[hoary_firefox_two] |
692 | 410 | 'hoary' | 435 | 'hoary' |
693 | 436 | |||
694 | 411 | >>> a_map[warty_firefox] | 437 | >>> a_map[warty_firefox] |
695 | 412 | 'warty' | 438 | 'warty' |
696 | 413 | 439 | ||
697 | 414 | 440 | ||
699 | 415 | == Direct Packagings == | 441 | Direct Packagings |
700 | 442 | ----------------- | ||
701 | 416 | 443 | ||
702 | 417 | The direct packaging returns the IPackaging related to the source | 444 | The direct packaging returns the IPackaging related to the source |
703 | 418 | package. | 445 | package. |
704 | 419 | 446 | ||
705 | 420 | >>> print sp.direct_packaging | 447 | >>> print sp.direct_packaging |
706 | 421 | None | 448 | None |
707 | 449 | |||
708 | 422 | >>> print hoary_firefox_one.direct_packaging.productseries.title | 450 | >>> print hoary_firefox_one.direct_packaging.productseries.title |
709 | 423 | Mozilla Firefox 1.0 series | 451 | Mozilla Firefox 1.0 series |
710 | 452 | |||
711 | 424 | >>> print warty_firefox.direct_packaging.productseries.title | 453 | >>> print warty_firefox.direct_packaging.productseries.title |
712 | 425 | Mozilla Firefox trunk series | 454 | Mozilla Firefox trunk series |
713 | 426 | 455 | ||
714 | 427 | If multiple product series link to a sourcepackage, direct_packaging | 456 | If multiple product series link to a sourcepackage, direct_packaging |
715 | 428 | returns the last packaging added: | 457 | returns the last packaging added: |
716 | 429 | 458 | ||
718 | 430 | >>> from canonical.launchpad.interfaces import IProductSet | 459 | >>> from lp.registry.interfaces.product import IProductSet |
719 | 431 | >>> firefox_product = getUtility(IProductSet).getByName('firefox') | 460 | >>> firefox_product = getUtility(IProductSet).getByName('firefox') |
720 | 432 | >>> firefox_trunk = firefox_product.getSeries('trunk') | 461 | >>> firefox_trunk = firefox_product.getSeries('trunk') |
721 | 433 | >>> PackagingUtil().createPackaging( | 462 | >>> PackagingUtil().createPackaging( |
722 | @@ -440,13 +469,14 @@ | |||
723 | 440 | Mozilla Firefox trunk series | 469 | Mozilla Firefox trunk series |
724 | 441 | 470 | ||
725 | 442 | 471 | ||
727 | 443 | == Release History == | 472 | Release History |
728 | 473 | --------------- | ||
729 | 444 | 474 | ||
730 | 445 | The distinct release history for a SourcePackage is obtained via | 475 | The distinct release history for a SourcePackage is obtained via |
731 | 446 | 'distinctreleases' property. | 476 | 'distinctreleases' property. |
732 | 447 | 477 | ||
735 | 448 | We will use `SoyuzTestPublisher` for creating source releases in | 478 | We will use `SoyuzTestPublisher` for creating source releases in Ubuntu |
736 | 449 | Ubuntu warty and hoary series. | 479 | warty and hoary series. |
737 | 450 | 480 | ||
738 | 451 | >>> from lp.soyuz.tests.test_publishing import ( | 481 | >>> from lp.soyuz.tests.test_publishing import ( |
739 | 452 | ... SoyuzTestPublisher) | 482 | ... SoyuzTestPublisher) |
740 | @@ -465,8 +495,8 @@ | |||
741 | 465 | 495 | ||
742 | 466 | >>> login(ANONYMOUS) | 496 | >>> login(ANONYMOUS) |
743 | 467 | 497 | ||
746 | 468 | Warty, hoary and grumpy SourcePackages only consider their | 498 | Warty, hoary and grumpy SourcePackages only consider their corresponding |
747 | 469 | corresponding versions, their history is isolated by series. | 499 | versions, their history is isolated by series. |
748 | 470 | 500 | ||
749 | 471 | >>> def print_releases(sourcepackage): | 501 | >>> def print_releases(sourcepackage): |
750 | 472 | ... releases = sourcepackage.distinctreleases | 502 | ... releases = sourcepackage.distinctreleases |
751 | @@ -490,8 +520,8 @@ | |||
752 | 490 | No releases available | 520 | No releases available |
753 | 491 | 521 | ||
754 | 492 | The SourcePackage history can overlap if releases are copied across | 522 | The SourcePackage history can overlap if releases are copied across |
757 | 493 | distroseries. The 'test-source - 1.0' is copied from warty to hoary | 523 | distroseries. The 'test-source - 1.0' is copied from warty to hoary and |
758 | 494 | and is present in the history for both. | 524 | is present in the history for both. |
759 | 495 | 525 | ||
760 | 496 | >>> login('foo.bar@canonical.com') | 526 | >>> login('foo.bar@canonical.com') |
761 | 497 | >>> copied_source = warty_source.copyTo( | 527 | >>> copied_source = warty_source.copyTo( |
762 | @@ -506,7 +536,8 @@ | |||
763 | 506 | test-source - 1.0 | 536 | test-source - 1.0 |
764 | 507 | 537 | ||
765 | 508 | We will create new source releases in warty and verify the ResultSet | 538 | We will create new source releases in warty and verify the ResultSet |
767 | 509 | returned from 'distinctreleases' is ordered by descending source version. | 539 | returned from 'distinctreleases' is ordered by descending source |
768 | 540 | version. | ||
769 | 510 | 541 | ||
770 | 511 | >>> login('foo.bar@canonical.com') | 542 | >>> login('foo.bar@canonical.com') |
771 | 512 | 543 | ||
772 | @@ -524,7 +555,8 @@ | |||
773 | 524 | test-source - 0.9 | 555 | test-source - 0.9 |
774 | 525 | 556 | ||
775 | 526 | 557 | ||
777 | 527 | == Interface implementation == | 558 | Interface implementation |
778 | 559 | ------------------------ | ||
779 | 528 | 560 | ||
780 | 529 | SourcePackage implements IHasTranslationImports interface: | 561 | SourcePackage implements IHasTranslationImports interface: |
781 | 530 | 562 | ||
782 | @@ -533,5 +565,8 @@ | |||
783 | 533 | ... IHasTranslationImports) | 565 | ... IHasTranslationImports) |
784 | 534 | >>> IHasTranslationImports.providedBy(warty_firefox) | 566 | >>> IHasTranslationImports.providedBy(warty_firefox) |
785 | 535 | True | 567 | True |
786 | 568 | |||
787 | 536 | >>> verifyObject(IHasTranslationImports, warty_firefox) | 569 | >>> verifyObject(IHasTranslationImports, warty_firefox) |
788 | 537 | True | 570 | True |
789 | 571 | |||
790 | 572 | |||
791 | 538 | 573 | ||
792 | === renamed file 'lib/canonical/launchpad/interfaces/packaging.py' => 'lib/lp/registry/interfaces/packaging.py' | |||
793 | === modified file 'lib/lp/registry/model/distribution.py' | |||
794 | --- lib/lp/registry/model/distribution.py 2009-09-09 11:28:03 +0000 | |||
795 | +++ lib/lp/registry/model/distribution.py 2009-10-16 20:36:17 +0000 | |||
796 | @@ -90,7 +90,7 @@ | |||
797 | 90 | from canonical.launchpad.interfaces.launchpad import ( | 90 | from canonical.launchpad.interfaces.launchpad import ( |
798 | 91 | IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage) | 91 | IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage) |
799 | 92 | from lp.soyuz.interfaces.queue import PackageUploadStatus | 92 | from lp.soyuz.interfaces.queue import PackageUploadStatus |
801 | 93 | from canonical.launchpad.interfaces.packaging import PackagingType | 93 | from lp.registry.interfaces.packaging import PackagingType |
802 | 94 | from lp.registry.interfaces.pillar import IPillarNameSet | 94 | from lp.registry.interfaces.pillar import IPillarNameSet |
803 | 95 | from lp.soyuz.interfaces.publishing import ( | 95 | from lp.soyuz.interfaces.publishing import ( |
804 | 96 | active_publishing_status, PackagePublishingStatus) | 96 | active_publishing_status, PackagePublishingStatus) |
805 | 97 | 97 | ||
806 | === modified file 'lib/lp/registry/model/distroseries.py' | |||
807 | --- lib/lp/registry/model/distroseries.py 2009-09-09 11:28:03 +0000 | |||
808 | +++ lib/lp/registry/model/distroseries.py 2009-10-16 20:36:17 +0000 | |||
809 | @@ -39,7 +39,7 @@ | |||
810 | 39 | from lp.translations.model.pofiletranslator import ( | 39 | from lp.translations.model.pofiletranslator import ( |
811 | 40 | POFileTranslator) | 40 | POFileTranslator) |
812 | 41 | from lp.translations.model.pofile import POFile | 41 | from lp.translations.model.pofile import POFile |
814 | 42 | from canonical.launchpad.interfaces import IStore | 42 | from canonical.launchpad.interfaces.lpstorm import IStore |
815 | 43 | from lp.soyuz.adapters.packagelocation import PackageLocation | 43 | from lp.soyuz.adapters.packagelocation import PackageLocation |
816 | 44 | from lp.soyuz.model.binarypackagename import BinaryPackageName | 44 | from lp.soyuz.model.binarypackagename import BinaryPackageName |
817 | 45 | from lp.soyuz.model.binarypackagerelease import ( | 45 | from lp.soyuz.model.binarypackagerelease import ( |
818 | @@ -66,7 +66,7 @@ | |||
819 | 66 | from lp.registry.model.milestone import ( | 66 | from lp.registry.model.milestone import ( |
820 | 67 | HasMilestonesMixin, Milestone) | 67 | HasMilestonesMixin, Milestone) |
821 | 68 | from lp.soyuz.model.packagecloner import clone_packages | 68 | from lp.soyuz.model.packagecloner import clone_packages |
823 | 69 | from canonical.launchpad.database.packaging import Packaging | 69 | from lp.registry.model.packaging import Packaging |
824 | 70 | from lp.registry.model.person import Person | 70 | from lp.registry.model.person import Person |
825 | 71 | from canonical.launchpad.database.librarian import LibraryFileAlias | 71 | from canonical.launchpad.database.librarian import LibraryFileAlias |
826 | 72 | from lp.translations.model.potemplate import ( | 72 | from lp.translations.model.potemplate import ( |
827 | 73 | 73 | ||
828 | === renamed file 'lib/canonical/launchpad/database/packaging.py' => 'lib/lp/registry/model/packaging.py' | |||
829 | --- lib/canonical/launchpad/database/packaging.py 2009-06-25 05:30:52 +0000 | |||
830 | +++ lib/lp/registry/model/packaging.py 2009-10-16 20:36:17 +0000 | |||
831 | @@ -14,8 +14,8 @@ | |||
832 | 14 | from canonical.database.datetimecol import UtcDateTimeCol | 14 | from canonical.database.datetimecol import UtcDateTimeCol |
833 | 15 | from canonical.database.enumcol import EnumCol | 15 | from canonical.database.enumcol import EnumCol |
834 | 16 | from canonical.database.sqlbase import SQLBase | 16 | from canonical.database.sqlbase import SQLBase |
837 | 17 | from canonical.launchpad.interfaces import ( | 17 | from lp.registry.interfaces.packaging import ( |
838 | 18 | PackagingType, IPackaging, IPackagingUtil) | 18 | IPackaging, IPackagingUtil, PackagingType) |
839 | 19 | from lp.registry.interfaces.person import validate_public_person | 19 | from lp.registry.interfaces.person import validate_public_person |
840 | 20 | 20 | ||
841 | 21 | 21 | ||
842 | 22 | 22 | ||
843 | === modified file 'lib/lp/registry/model/product.py' | |||
844 | --- lib/lp/registry/model/product.py 2009-10-07 22:30:34 +0000 | |||
845 | +++ lib/lp/registry/model/product.py 2009-10-16 20:36:17 +0000 | |||
846 | @@ -32,7 +32,7 @@ | |||
847 | 32 | from canonical.database.datetimecol import UtcDateTimeCol | 32 | from canonical.database.datetimecol import UtcDateTimeCol |
848 | 33 | from canonical.database.enumcol import EnumCol | 33 | from canonical.database.enumcol import EnumCol |
849 | 34 | from canonical.database.sqlbase import quote, SQLBase, sqlvalues | 34 | from canonical.database.sqlbase import quote, SQLBase, sqlvalues |
851 | 35 | from canonical.launchpad.interfaces import IStore | 35 | from canonical.launchpad.interfaces.lpstorm import IStore |
852 | 36 | from lp.code.model.branchvisibilitypolicy import ( | 36 | from lp.code.model.branchvisibilitypolicy import ( |
853 | 37 | BranchVisibilityPolicyMixin) | 37 | BranchVisibilityPolicyMixin) |
854 | 38 | from lp.code.model.hasbranches import HasBranchesMixin, HasMergeProposalsMixin | 38 | from lp.code.model.hasbranches import HasBranchesMixin, HasMergeProposalsMixin |
855 | @@ -57,7 +57,7 @@ | |||
856 | 57 | from lp.registry.interfaces.person import ( | 57 | from lp.registry.interfaces.person import ( |
857 | 58 | validate_person_not_private_membership, validate_public_person) | 58 | validate_person_not_private_membership, validate_public_person) |
858 | 59 | from lp.registry.model.announcement import MakesAnnouncements | 59 | from lp.registry.model.announcement import MakesAnnouncements |
860 | 60 | from canonical.launchpad.database.packaging import Packaging | 60 | from lp.registry.model.packaging import Packaging |
861 | 61 | from lp.registry.model.pillar import HasAliasMixin | 61 | from lp.registry.model.pillar import HasAliasMixin |
862 | 62 | from lp.registry.model.person import Person | 62 | from lp.registry.model.person import Person |
863 | 63 | from lp.registry.model.productlicense import ProductLicense | 63 | from lp.registry.model.productlicense import ProductLicense |
864 | 64 | 64 | ||
865 | === modified file 'lib/lp/registry/model/productseries.py' | |||
866 | --- lib/lp/registry/model/productseries.py 2009-10-06 17:45:46 +0000 | |||
867 | +++ lib/lp/registry/model/productseries.py 2009-10-16 20:36:17 +0000 | |||
868 | @@ -33,7 +33,7 @@ | |||
869 | 33 | from lp.services.worlddata.model.language import Language | 33 | from lp.services.worlddata.model.language import Language |
870 | 34 | from lp.registry.model.milestone import ( | 34 | from lp.registry.model.milestone import ( |
871 | 35 | HasMilestonesMixin, Milestone) | 35 | HasMilestonesMixin, Milestone) |
873 | 36 | from canonical.launchpad.database.packaging import Packaging | 36 | from lp.registry.model.packaging import Packaging |
874 | 37 | from lp.registry.interfaces.person import ( | 37 | from lp.registry.interfaces.person import ( |
875 | 38 | validate_person_not_private_membership) | 38 | validate_person_not_private_membership) |
876 | 39 | from lp.translations.model.pofile import POFile | 39 | from lp.translations.model.pofile import POFile |
877 | @@ -53,7 +53,7 @@ | |||
878 | 53 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 53 | from lp.registry.interfaces.distroseries import DistroSeriesStatus |
879 | 54 | from lp.registry.model.distroseries import SeriesMixin | 54 | from lp.registry.model.distroseries import SeriesMixin |
880 | 55 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | 55 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
882 | 56 | from canonical.launchpad.interfaces.packaging import PackagingType | 56 | from lp.registry.interfaces.packaging import PackagingType |
883 | 57 | from lp.translations.interfaces.potemplate import IHasTranslationTemplates | 57 | from lp.translations.interfaces.potemplate import IHasTranslationTemplates |
884 | 58 | from lp.blueprints.interfaces.specification import ( | 58 | from lp.blueprints.interfaces.specification import ( |
885 | 59 | SpecificationDefinitionStatus, SpecificationFilter, | 59 | SpecificationDefinitionStatus, SpecificationFilter, |
886 | 60 | 60 | ||
887 | === modified file 'lib/lp/registry/model/sourcepackage.py' | |||
888 | --- lib/lp/registry/model/sourcepackage.py 2009-09-30 18:15:41 +0000 | |||
889 | +++ lib/lp/registry/model/sourcepackage.py 2009-10-16 20:36:17 +0000 | |||
890 | @@ -32,11 +32,11 @@ | |||
891 | 32 | DistributionSourcePackageRelease) | 32 | DistributionSourcePackageRelease) |
892 | 33 | from lp.soyuz.model.distroseriessourcepackagerelease import ( | 33 | from lp.soyuz.model.distroseriessourcepackagerelease import ( |
893 | 34 | DistroSeriesSourcePackageRelease) | 34 | DistroSeriesSourcePackageRelease) |
895 | 35 | from canonical.launchpad.database.packaging import Packaging | 35 | from lp.registry.model.packaging import Packaging |
896 | 36 | from lp.translations.model.potemplate import ( | 36 | from lp.translations.model.potemplate import ( |
897 | 37 | HasTranslationTemplatesMixin, | 37 | HasTranslationTemplatesMixin, |
898 | 38 | POTemplate) | 38 | POTemplate) |
900 | 39 | from canonical.launchpad.interfaces import IStore | 39 | from canonical.launchpad.interfaces.lpstorm import IStore |
901 | 40 | from lp.soyuz.model.publishing import ( | 40 | from lp.soyuz.model.publishing import ( |
902 | 41 | SourcePackagePublishingHistory) | 41 | SourcePackagePublishingHistory) |
903 | 42 | from lp.answers.model.question import ( | 42 | from lp.answers.model.question import ( |
904 | @@ -50,7 +50,7 @@ | |||
905 | 50 | from canonical.launchpad.helpers import shortlist | 50 | from canonical.launchpad.helpers import shortlist |
906 | 51 | from lp.soyuz.interfaces.build import BuildStatus | 51 | from lp.soyuz.interfaces.build import BuildStatus |
907 | 52 | from lp.soyuz.interfaces.buildrecords import IHasBuildRecords | 52 | from lp.soyuz.interfaces.buildrecords import IHasBuildRecords |
909 | 53 | from canonical.launchpad.interfaces.packaging import PackagingType | 53 | from lp.registry.interfaces.packaging import PackagingType |
910 | 54 | from lp.translations.interfaces.potemplate import IHasTranslationTemplates | 54 | from lp.translations.interfaces.potemplate import IHasTranslationTemplates |
911 | 55 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 55 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
912 | 56 | from lp.soyuz.interfaces.publishing import PackagePublishingStatus | 56 | from lp.soyuz.interfaces.publishing import PackagePublishingStatus |
913 | 57 | 57 | ||
914 | === added directory 'lib/lp/registry/stories/packaging' | |||
915 | === renamed file 'lib/canonical/launchpad/pagetests/packaging/xx-sourcepackage-packaging.txt' => 'lib/lp/registry/stories/packaging/xx-sourcepackage-packaging.txt' | |||
916 | === renamed file 'lib/canonical/launchpad/pagetests/packaging/xx-ubuntu-pkging.txt' => 'lib/lp/registry/stories/packaging/xx-ubuntu-pkging.txt' | |||
917 | === renamed file 'lib/canonical/launchpad/tests/test_packaging.py' => 'lib/lp/registry/tests/test_packaging.py' | |||
918 | --- lib/canonical/launchpad/tests/test_packaging.py 2009-06-25 05:30:52 +0000 | |||
919 | +++ lib/lp/registry/tests/test_packaging.py 2009-10-16 20:36:17 +0000 | |||
920 | @@ -9,8 +9,10 @@ | |||
921 | 9 | 9 | ||
922 | 10 | from zope.component import getUtility | 10 | from zope.component import getUtility |
923 | 11 | 11 | ||
926 | 12 | from canonical.launchpad.interfaces import ( | 12 | from lp.registry.interfaces.distribution import IDistributionSet |
927 | 13 | IDistributionSet, IProductSet, ISourcePackageNameSet, IPackagingUtil) | 13 | from lp.registry.interfaces.packaging import IPackagingUtil |
928 | 14 | from lp.registry.interfaces.product import IProductSet | ||
929 | 15 | from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet | ||
930 | 14 | from canonical.launchpad.ftests import login | 16 | from canonical.launchpad.ftests import login |
931 | 15 | from canonical.testing import LaunchpadFunctionalLayer | 17 | from canonical.testing import LaunchpadFunctionalLayer |
932 | 16 | 18 | ||
933 | 17 | 19 | ||
934 | === modified file 'utilities/migrater/migrater.py' | |||
935 | --- utilities/migrater/migrater.py 2009-09-17 17:29:33 +0000 | |||
936 | +++ utilities/migrater/migrater.py 2009-10-16 20:36:17 +0000 | |||
937 | @@ -33,6 +33,7 @@ | |||
938 | 33 | svc='services', | 33 | svc='services', |
939 | 34 | tes='testing', | 34 | tes='testing', |
940 | 35 | tra='translations', | 35 | tra='translations', |
941 | 36 | pkg='registry', | ||
942 | 36 | ) | 37 | ) |
943 | 37 | 38 | ||
944 | 38 | RENAME_MAP = dict( | 39 | RENAME_MAP = dict( |
945 | @@ -108,6 +109,7 @@ | |||
946 | 108 | 109 | ||
947 | 109 | COLLIDED = [] | 110 | COLLIDED = [] |
948 | 110 | 111 | ||
949 | 112 | |||
950 | 111 | def move_it(old_path, new_path): | 113 | def move_it(old_path, new_path): |
951 | 112 | """Move a versioned file without colliding with another file.""" | 114 | """Move a versioned file without colliding with another file.""" |
952 | 113 | # Move the file and fix the imports. LBYL. | 115 | # Move the file and fix the imports. LBYL. |
953 | @@ -233,8 +235,8 @@ | |||
954 | 233 | # All unit tests except to browser unit tests move to the app | 235 | # All unit tests except to browser unit tests move to the app |
955 | 234 | # tests dir. | 236 | # tests dir. |
956 | 235 | new_path = os.sep.join( | 237 | new_path = os.sep.join( |
959 | 236 | path_part for path_part in path.split(os.sep) | 238 | path_part for path_part in new_path.split(os.sep) |
960 | 237 | if path_path not in unsupported_dirs) | 239 | if path_part not in unsupported_dirs) |
961 | 238 | # Create new_path's directory if it doesn't exist yet. | 240 | # Create new_path's directory if it doesn't exist yet. |
962 | 239 | try: | 241 | try: |
963 | 240 | test_dir, dummy = os.path.split(new_path) | 242 | test_dir, dummy = os.path.split(new_path) |
964 | @@ -586,7 +588,7 @@ | |||
965 | 586 | path, file_name = os.path.split(to_path) | 588 | path, file_name = os.path.split(to_path) |
966 | 587 | spew(" to_path = %s", to_path) | 589 | spew(" to_path = %s", to_path) |
967 | 588 | new_path_to_dir = os.path.join(NEW_TOP, app_name, path) | 590 | new_path_to_dir = os.path.join(NEW_TOP, app_name, path) |
969 | 589 | new_path_to_fn = os.path.join(NEW_TOP, app_name, to_path) | 591 | new_path_to_fn = os.path.join(NEW_TOP, app_name, to_path) |
970 | 590 | # Special cases. | 592 | # Special cases. |
971 | 591 | if set(fpath.split(os.sep)) & TEST_PATHS: | 593 | if set(fpath.split(os.sep)) & TEST_PATHS: |
972 | 592 | handle_test(full_path, new_path_to_fn) | 594 | handle_test(full_path, new_path_to_fn) |
This is my first branch to ensure valid upstream package links. There
are many oopses relating to the creation and efforts to fix invalid packages.
The root cause is a bad DB constraint and two views that do not do the
required sanity checks: +addPackage and +ubuntupkg
This branch is a set of mechanical changed made by the migrater script to
move packaging from canonical.launchpad to lp.registry
lp:~sinzui/launchpad/package-link-validation /bugs.launchpad .net/bugs/ 453212
-t stories/packaging implementation: flacoste
Diff size: 395
Launchpad bug: https:/
Test command: ./bin/test -vv -t test_packaging \
Pre-
Target release: 3.1.10
== Rules ==
* Run th migrator to take ownership of the problem code.
== QA ==
* Visit any productseries that you are the owner or release manager of
* Choose (+) Add package
* Verify the page displays a for to choose a distroseries and source
package.
== Lint ==
Linting changed files: /launchpad/ security. py /launchpad/ browser/ __init_ _.py /launchpad/ database/ __init_ _.py /launchpad/ interfaces/ __init_ _.py /launchpad/ zcml/configure. zcml registry/ configure. zcml registry/ browser/ configure. zcml registry/ browser/ distributionsou rcepackage. py registry/ browser/ packaging. py registry/ browser/ sourcepackage. py registry/ browser/ tests/test_ packaging. py registry/ browser/ tests/test_ person_ view.py registry/ model/distribut ion.py registry/ model/distroser ies.py registry/ model/packaging .py registry/ model/product. py registry/ model/productse ries.py registry/ model/sourcepac kage.py registry/ stories/ packaging/ registry/ tests/test_ packaging. py migrater/ migrater. py
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
utilities/
== Test ==
No tests changed. The three migrated tests do work.
== Implementation ==
* utilities/ migrater/ migrater. py
Fixed errors that were committed some time ago.