Merge lp:~michael.nelson/launchpad/211008-visual-indicator-superseded-pkgs into lp:launchpad/db-devel

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/211008-visual-indicator-superseded-pkgs
Merge into: lp:launchpad/db-devel
Diff against target: 613 lines (+198/-81)
12 files modified
lib/canonical/launchpad/icing/style-3-0.css (+3/-0)
lib/canonical/launchpad/javascript/lp/comment.js (+0/-1)
lib/lp/code/browser/codereviewcomment.py (+4/-3)
lib/lp/code/templates/branchmergeproposal-index.pt (+62/-27)
lib/lp/registry/browser/team.py (+4/-2)
lib/lp/soyuz/doc/publishing.txt (+33/-12)
lib/lp/soyuz/interfaces/publishing.py (+5/-0)
lib/lp/soyuz/model/publishing.py (+17/-16)
lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+14/-13)
lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt (+32/-1)
lib/lp/soyuz/templates/archive-index.pt (+15/-4)
lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt (+9/-2)
To merge this branch: bzr merge lp:~michael.nelson/launchpad/211008-visual-indicator-superseded-pkgs
Reviewer Review Type Date Requested Status
Martin Albisetti (community) ui Approve
Paul Hummer (community) code ui Approve
Canonical Launchpad Engineering ui Pending
Review via email: mp+15963@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

= Summary =

Ensures that if a package in a PPA has been superseded by later version of the same package in the distroseries primary/partner archive, then it will be indicated in the PPA UI.

== Proposed fix ==

Add ISourcePackagePublishingHistory.newer_distroseries_version and use this in the template to add a link to the newer version as well as highlight the row subtly with a gray background.

== Pre-implementation notes ==

See comments on bug 211008 (I did some UI pre-imp there). Note, I ended up removing the icon altogether as it was not subtle at all.

== Implementation details ==

== Tests ==
bin/test -vv -t doc/publishing.txt -t xx-ubuntu-ppas.txt

== Demo and Q/A ==

To demo:
 1. visit https://launchpad.dev/~cprov/+archive/ppa
 2. In a `bin/iharness` run the following script:
http://pastebin.ubuntu.com/338780/
 3. Reload https://launchpad.dev/~cprov/+archive/ppa
 4. Click on 'View package details' and see the same change there also.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
  lib/lp/soyuz/model/publishing.py
  lib/lp/soyuz/doc/publishing.txt
  lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt
  lib/lp/soyuz/interfaces/publishing.py
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/soyuz/templates/archive-index.pt

== Pylint notices ==

lib/lp/soyuz/interfaces/publishing.py
    33: [F0401] Unable to import 'lazr.enum' (No module named enum)
    40: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
    41: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)

Revision history for this message
Paul Hummer (rockstar) :
review: Approve (code)
Revision history for this message
Paul Hummer (rockstar) :
review: Approve (code ui)
Revision history for this message
Martin Albisetti (beuno) wrote :

Nothing to add, great job :)

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-12-07 13:53:47 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-12-11 15:59:14 +0000
@@ -566,6 +566,9 @@
566 background-repeat: no-repeat;566 background-repeat: no-repeat;
567 background-position:right center;567 background-position:right center;
568}568}
569table#packages_list tr.superseded {
570 background-color: #eee;
571}
569/* The following could be generalised for use to the following selector:572/* The following could be generalised for use to the following selector:
570 * .side .portlet li.nth-child(odd)573 * .side .portlet li.nth-child(odd)
571 * if needed. */574 * if needed. */
572575
=== modified file 'lib/canonical/launchpad/javascript/lp/comment.js'
--- lib/canonical/launchpad/javascript/lp/comment.js 2009-11-26 19:54:52 +0000
+++ lib/canonical/launchpad/javascript/lp/comment.js 2009-12-11 15:59:14 +0000
@@ -361,7 +361,6 @@
361 },361 },
362 renderUI: function() {362 renderUI: function() {
363 CodeReviewComment.superclass.renderUI.apply(this);363 CodeReviewComment.superclass.renderUI.apply(this);
364 Y.one('#inline-add-comment').setStyle('display', 'block');
365 },364 },
366 /**365 /**
367 * Implementation of Widget.bindUI: Bind events to methods.366 * Implementation of Widget.bindUI: Bind events to methods.
368367
=== modified file 'lib/lp/code/browser/codereviewcomment.py'
--- lib/lp/code/browser/codereviewcomment.py 2009-10-29 23:51:08 +0000
+++ lib/lp/code/browser/codereviewcomment.py 2009-12-11 15:59:14 +0000
@@ -204,7 +204,7 @@
204204
205 class MyDropWidget(DropdownWidget):205 class MyDropWidget(DropdownWidget):
206 "Override the default no-value display name to -Select-."206 "Override the default no-value display name to -Select-."
207 _messageNoValue = '-Select-'207 _messageNoValue = 'Comment only'
208208
209 schema = IEditCodeReviewComment209 schema = IEditCodeReviewComment
210210
@@ -251,10 +251,11 @@
251 @action('Save Comment', name='add')251 @action('Save Comment', name='add')
252 def add_action(self, action, data):252 def add_action(self, action, data):
253 """Create the comment..."""253 """Create the comment..."""
254 vote = data.get('vote')
255 review_type = data.get('review_type')
254 comment = self.branch_merge_proposal.createComment(256 comment = self.branch_merge_proposal.createComment(
255 self.user, subject=None, content=data['comment'],257 self.user, subject=None, content=data['comment'],
256 parent=self.reply_to, vote=data['vote'],258 parent=self.reply_to, vote=vote, review_type=review_type)
257 review_type=data['review_type'])
258259
259 @property260 @property
260 def next_url(self):261 def next_url(self):
261262
=== modified file 'lib/lp/code/templates/branchmergeproposal-index.pt'
--- lib/lp/code/templates/branchmergeproposal-index.pt 2009-11-26 23:36:50 +0000
+++ lib/lp/code/templates/branchmergeproposal-index.pt 2009-12-11 15:59:14 +0000
@@ -21,6 +21,24 @@
21 #commit-message, #edit-commit-message {21 #commit-message, #edit-commit-message {
22 margin: 1em 0 0 0;22 margin: 1em 0 0 0;
23 }23 }
24 #add-comment-form {
25 max-width: 60em;
26 padding-bottom: 3em;
27 }
28 #add-comment-form textarea{
29 width: 100%;
30 max-width: inherit;
31 }
32 #add-comment-form .actions {
33 float: right;
34 margin: 0 -0.5em;
35 }
36 #add-comment-review-fields {
37 margin-top: 1em;
38 }
39 #add-comment-review-fields div {
40 display: inline;
41 }
24 /* A page-specific fix for inline text are editing to line up box. */42 /* A page-specific fix for inline text are editing to line up box. */
25 #edit-commit-message .yui-ieditor-input { top: 0; }43 #edit-commit-message .yui-ieditor-input { top: 0; }
26 </style>44 </style>
@@ -92,6 +110,12 @@
92 </div>110 </div>
93111
94 <div class="yui-g">112 <div class="yui-g">
113 <tal:not-logged-in condition="not: view/user">
114 <div align="center" id="add-comment-login-first">
115 To post a comment you must <a href="+login">log in</a>.
116 </div>
117 </tal:not-logged-in>
118
95 <div tal:define="link menu/add_comment"119 <div tal:define="link menu/add_comment"
96 tal:condition="link/enabled"120 tal:condition="link/enabled"
97 tal:content="structure link/render">121 tal:content="structure link/render">
@@ -101,20 +125,27 @@
101 <div id="conversation"125 <div id="conversation"
102 tal:content="structure view/conversation/@@+render"/>126 tal:content="structure view/conversation/@@+render"/>
103 </div>127 </div>
104 <!-- Hide inline commenting if YUI isn't used. -->128
105 <div id="inline-add-comment" style="display: none">129 <tal:logged-in condition="view/user">
106 <tal:comment replace="structure context/@@+comment/++form++" />130 <div tal:define="comment_form nocall:context/@@+comment;
107 <div class="actions" id="launchpad-form-actions">131 dummy comment_form/initialize">
108 <input type="submit" id="field.actions.add" name="field.actions.add" value="Save Comment" class="button" />132 <h2 id="add-comment">Add comment</h2>
109 </div>133 <form action="+comment"
110 </div>134 method="post"
111135 enctype="multipart/form-data"
112 <script type="text/javascript">136 accept-charset="UTF-8"
113 LPS.use('lp.comment', function(Y) {137 id="add-comment-form">
114 var comment = new Y.lp.CodeReviewComment();138 <tal:comment-input replace="structure comment_form/widgets/comment"/>
115 comment.render();139 <div id="add-comment-review-fields">
116 })140 Review: <tal:review replace="structure comment_form/widgets/vote"/>
117 </script>141 Review type: <tal:review replace="structure comment_form/widgets/review_type"/>
142 <div class="actions"
143 tal:content="structure comment_form/actions/field.actions.add/render" />
144 </div>
145 </form>
146 </div>
147 </tal:logged-in>
148
118 <div class="yui-g">149 <div class="yui-g">
119 <div class="yui-u first">150 <div class="yui-u first">
120 <div id="source-revisions"151 <div id="source-revisions"
@@ -159,21 +190,25 @@
159 string:&lt;script id='codereview-script' type='text/javascript'&gt;" />190 string:&lt;script id='codereview-script' type='text/javascript'&gt;" />
160 conf = <tal:status-config replace="view/status_config" />191 conf = <tal:status-config replace="view/status_config" />
161 <!--192 <!--
162 LPS.use('io-base', 'code.codereview', 'code.branchmergeproposal',193 LPS.use('io-base', 'code.codereview', 'code.branchmergeproposal', 'lp.comment',
163 function(Y) {194 function(Y) {
164195
165196 Y.on('load', function() {
166 if(Y.UA.ie) {197 var logged_in = LP.client.links['me'] !== undefined;
167 return;198
168 }199 if (logged_in) {
169200 var comment = new Y.lp.CodeReviewComment();
170 Y.on('domready', function() {201 comment.render();
171 Y.code.codereview.connect_links();202
172 Y.code.branchmergeproposal.connect_status(conf);203 if(Y.UA.ie) {
173 });204 return;
174205 }
175 (new Y.codereview.NumberToggle()).render();206
176207 Y.code.codereview.connect_links();
208 Y.code.branchmergeproposal.connect_status(conf);
209 }
210 (new Y.codereview.NumberToggle()).render();
211 }, window);
177 });212 });
178 -->213 -->
179<tal:script replace="structure string:&lt;/script&gt;" />214<tal:script replace="structure string:&lt;/script&gt;" />
180215
=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py 2009-12-01 22:09:05 +0000
+++ lib/lp/registry/browser/team.py 2009-12-11 15:59:14 +0000
@@ -901,7 +901,6 @@
901 return None901 return None
902902
903903
904
905class ProposedTeamMembersEditView(LaunchpadFormView):904class ProposedTeamMembersEditView(LaunchpadFormView):
906 schema = Interface905 schema = Interface
907 label = 'Proposed team members'906 label = 'Proposed team members'
@@ -915,7 +914,10 @@
915 status = TeamMembershipStatus.APPROVED914 status = TeamMembershipStatus.APPROVED
916 elif action == "decline":915 elif action == "decline":
917 status = TeamMembershipStatus.DECLINED916 status = TeamMembershipStatus.DECLINED
918 elif action == "hold":917 else:
918 # The action is "hold" or no action was specified for this
919 # person, which could happen if the set of proposed members
920 # changed while the form was being processed.
919 continue921 continue
920922
921 self.context.setMembershipData(923 self.context.setMembershipData(
922924
=== modified file 'lib/lp/soyuz/doc/publishing.txt'
--- lib/lp/soyuz/doc/publishing.txt 2009-12-04 13:46:43 +0000
+++ lib/lp/soyuz/doc/publishing.txt 2009-12-11 15:59:14 +0000
@@ -112,16 +112,34 @@
112 >>> print pub.changes_file_url112 >>> print pub.changes_file_url
113 http://launchpad.dev/ubuntu/+archive/primary/+files/mozilla-firefox_0.9_i386.changes113 http://launchpad.dev/ubuntu/+archive/primary/+files/mozilla-firefox_0.9_i386.changes
114114
115There is also a helper property to determine whether the current release for
116this package in the distroseries is newer than this publishing. Nothing is
117returned if there is no package in the distroseries primary archive with a
118later version.
119
120 >>> print pub.newer_distroseries_version
121 None
122
123If we publish iceweasel 1.1 in the same distroseries, then the distroseries
124source package release will be returned.
125
126 >>> from lp.soyuz.tests.test_publishing import (
127 ... SoyuzTestPublisher)
128 >>> test_publisher = SoyuzTestPublisher()
129 >>> test_publisher.prepareBreezyAutotest()
130 >>> new_version = test_publisher.getPubSource(
131 ... distroseries=pub.distroseries, version="1.1",
132 ... sourcename='iceweasel')
133
134 >>> print pub.newer_distroseries_version.title
135 "iceweasel" 1.1 source package in The Warty Warthog Release
136
115A helper is also included to create a summary of the build statuses for137A helper is also included to create a summary of the build statuses for
116the spph's related builds, getStatusSummaryForBuilds(), which just138the spph's related builds, getStatusSummaryForBuilds(), which just
117augments the IBuildSet.getStatusSummaryForBuilds() method to include the139augments the IBuildSet.getStatusSummaryForBuilds() method to include the
118'pending' state when builds are fully built but not yet published.140'pending' state when builds are fully built but not yet published.
119141
120 >>> from lp.soyuz.tests.test_publishing import (
121 ... SoyuzTestPublisher)
122 >>> from lp.soyuz.interfaces.build import BuildStatus142 >>> from lp.soyuz.interfaces.build import BuildStatus
123 >>> test_publisher = SoyuzTestPublisher()
124 >>> test_publisher.prepareBreezyAutotest()
125 >>> spph = test_publisher.getPubSource(architecturehintlist='any')143 >>> spph = test_publisher.getPubSource(architecturehintlist='any')
126 >>> builds = spph.createMissingBuilds()144 >>> builds = spph.createMissingBuilds()
127 >>> for build in builds:145 >>> for build in builds:
@@ -1214,14 +1232,17 @@
1214Please note how the result set is ordered by the id of `LibraryFileAlias`1232Please note how the result set is ordered by the id of `LibraryFileAlias`
1215(second element of the triple):1233(second element of the triple):
12161234
1235 >>> file_ids = [file.id for source, file, content in binary_files]
1236 >>> file_ids == sorted(file_ids)
1237 True
1217 >>> for source, file, content in binary_files:1238 >>> for source, file, content in binary_files:
1218 ... print file.id, file.filename1239 ... print file.filename
1219 40 mozilla-firefox_0.9_i386.deb1240 mozilla-firefox_0.9_i386.deb
1220 124 foo-bin_666_all.deb1241 foo-bin_666_all.deb
1221 124 foo-bin_666_all.deb1242 foo-bin_666_all.deb
1222 130 foo-bin_999_all.deb1243 foo-bin_999_all.deb
1223 130 foo-bin_999_all.deb1244 foo-bin_999_all.deb
1224 135 foo-bin_666_all.deb1245 foo-bin_666_all.deb
12251246
1226getPackageDiffsForSources() is also provided by `IPublishingSet`, it1247getPackageDiffsForSources() is also provided by `IPublishingSet`, it
1227allows callsites to retrieve all related `PackageDiff` records based1248allows callsites to retrieve all related `PackageDiff` records based
@@ -1694,7 +1715,7 @@
1694 Relevant builds:1715 Relevant builds:
1695 - i386 build of foobar-test 666 in ubuntutest breezy-autotest RELEASE1716 - i386 build of foobar-test 666 in ubuntutest breezy-autotest RELEASE
16961717
1697Any of the source ids passed into 1718Any of the source ids passed into
1698getBuildStatusSummariesForSourceIdsAndArchive that do not belong to the1719getBuildStatusSummariesForSourceIdsAndArchive that do not belong to the
1699required archive parameter will be ignored:1720required archive parameter will be ignored:
17001721
17011722
=== modified file 'lib/lp/soyuz/interfaces/publishing.py'
--- lib/lp/soyuz/interfaces/publishing.py 2009-12-07 10:36:21 +0000
+++ lib/lp/soyuz/interfaces/publishing.py 2009-12-11 15:59:14 +0000
@@ -570,6 +570,11 @@
570 required=False, readonly=True,570 required=False, readonly=True,
571 ))571 ))
572572
573 newer_distroseries_version = Attribute(
574 "An `IDistroSeriosSourcePackageRelease` with a newer version of this "
575 "package that has been published in the main distribution series, "
576 "if one exists, or None.")
577
573 # Really IBinaryPackagePublishingHistory, see below.578 # Really IBinaryPackagePublishingHistory, see below.
574 @operation_returns_collection_of(Interface)579 @operation_returns_collection_of(Interface)
575 @export_read_operation()580 @export_read_operation()
576581
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py 2009-12-07 11:11:28 +0000
+++ lib/lp/soyuz/model/publishing.py 2009-12-11 15:59:14 +0000
@@ -18,6 +18,7 @@
18 ]18 ]
1919
2020
21import apt_pkg
21from datetime import datetime22from datetime import datetime
22import operator23import operator
23import os24import os
@@ -45,7 +46,6 @@
45 BinaryPackageFile, SourcePackageReleaseFile)46 BinaryPackageFile, SourcePackageReleaseFile)
46from canonical.launchpad.database.librarian import (47from canonical.launchpad.database.librarian import (
47 LibraryFileAlias, LibraryFileContent)48 LibraryFileAlias, LibraryFileContent)
48from canonical.launchpad.helpers import getFileType
49from lp.soyuz.model.packagediff import PackageDiff49from lp.soyuz.model.packagediff import PackageDiff
50from lp.soyuz.interfaces.archive import ArchivePurpose50from lp.soyuz.interfaces.archive import ArchivePurpose
51from lp.soyuz.interfaces.component import IComponentSet51from lp.soyuz.interfaces.component import IComponentSet
@@ -64,7 +64,6 @@
64from canonical.launchpad.webapp.interfaces import (64from canonical.launchpad.webapp.interfaces import (
65 IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)65 IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
66from lp.registry.interfaces.person import validate_public_person66from lp.registry.interfaces.person import validate_public_person
67from lp.registry.interfaces.sourcepackage import SourcePackageFileType
68from canonical.launchpad.webapp.interfaces import NotFoundError67from canonical.launchpad.webapp.interfaces import NotFoundError
6968
7069
@@ -516,6 +515,19 @@
516 return self.sourcepackagerelease.dscsigningkey.owner515 return self.sourcepackagerelease.dscsigningkey.owner
517 return None516 return None
518517
518 @property
519 def newer_distroseries_version(self):
520 """See `ISourcePackagePublishingHistory`."""
521 latest_releases = self.distroseries.getCurrentSourceReleases(
522 [self.sourcepackagerelease.sourcepackagename])
523 latest_release = latest_releases.get(self.meta_sourcepackage, None)
524
525 if latest_release is not None and apt_pkg.VersionCompare(
526 latest_release.version, self.source_package_version) > 0:
527 return latest_release
528 else:
529 return None
530
519 def getPublishedBinaries(self):531 def getPublishedBinaries(self):
520 """See `ISourcePackagePublishingHistory`."""532 """See `ISourcePackagePublishingHistory`."""
521 publishing_set = getUtility(IPublishingSet)533 publishing_set = getUtility(IPublishingSet)
@@ -1465,14 +1477,6 @@
14651477
1466 def getFilesForSources(self, one_or_more_source_publications):1478 def getFilesForSources(self, one_or_more_source_publications):
1467 """See `IPublishingSet`."""1479 """See `IPublishingSet`."""
1468 # Import Build and BinaryPackageRelease locally to avoid circular
1469 # imports, since that Build already imports
1470 # SourcePackagePublishingHistory and BinaryPackageRelease imports
1471 # Build.
1472 from lp.soyuz.model.binarypackagerelease import (
1473 BinaryPackageRelease)
1474 from lp.soyuz.model.build import Build
1475
1476 source_publication_ids = self._extractIDs(1480 source_publication_ids = self._extractIDs(
1477 one_or_more_source_publications)1481 one_or_more_source_publications)
14781482
@@ -1497,12 +1501,9 @@
1497 def getBinaryPublicationsForSources(1501 def getBinaryPublicationsForSources(
1498 self, one_or_more_source_publications):1502 self, one_or_more_source_publications):
1499 """See `IPublishingSet`."""1503 """See `IPublishingSet`."""
1500 # Import Build, BinaryPackageRelease and DistroArchSeries locally1504 # Import Buildand DistroArchSeries locally to avoid circular imports,
1501 # to avoid circular imports, since Build uses1505 # since Build uses SourcePackagePublishingHistory and DistroArchSeries
1502 # SourcePackagePublishingHistory, BinaryPackageRelease uses Build1506 # uses BinaryPackagePublishingHistory.
1503 # and DistroArchSeries uses BinaryPackagePublishingHistory.
1504 from lp.soyuz.model.binarypackagerelease import (
1505 BinaryPackageRelease)
1506 from lp.soyuz.model.distroarchseries import (1507 from lp.soyuz.model.distroarchseries import (
1507 DistroArchSeries)1508 DistroArchSeries)
15081509
15091510
=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2009-12-07 14:47:54 +0000
+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2009-12-11 15:59:14 +0000
@@ -243,7 +243,8 @@
243243
244James uses the link in the copy summary to go straight to the target244James uses the link in the copy summary to go straight to the target
245PPA, his own. There he can see the just copied package as PENDING and245PPA, his own. There he can see the just copied package as PENDING and
246also marked as pending build for i386.246also marked as pending build for i386. Note, he is also informed that
247there is actually a newer version already available in hoary.
247248
248 >>> jblack_browser.getLink('PPA for James Blackwell').click()249 >>> jblack_browser.getLink('PPA for James Blackwell').click()
249 >>> print jblack_browser.title250 >>> print jblack_browser.title
@@ -252,7 +253,7 @@
252 >>> print_ppa_packages(jblack_browser.contents)253 >>> print_ppa_packages(jblack_browser.contents)
253 Source Published Status Series Section Build254 Source Published Status Series Section Build
254 Status255 Status
255 pmount - 0.1-1 Pending Hoary Editors i386256 pmount - 0.1-1 (Newer...) Pending Hoary Editors i386
256257
257Expanding the details area, James can see that the source copied is258Expanding the details area, James can see that the source copied is
258indeed the same by checking the changelog, also that the binaries259indeed the same by checking the changelog, also that the binaries
@@ -337,7 +338,7 @@
337 >>> print_ppa_packages(jblack_browser.contents)338 >>> print_ppa_packages(jblack_browser.contents)
338 Source Published Status Series Section Build339 Source Published Status Series Section Build
339 Status340 Status
340 pmount - 0.1-1 Pending Hoary Editors i386341 pmount - 0.1-1 (Newer...) Pending Hoary Editors i386
341342
342Then selects pmount in hoary.343Then selects pmount in hoary.
343344
@@ -504,7 +505,7 @@
504 Source Published Status Series Section Build505 Source Published Status Series Section Build
505 Status506 Status
506 pmount - 0.1-1 Pending Grumpy Editors507 pmount - 0.1-1 Pending Grumpy Editors
507 pmount - 0.1-1 Pending Hoary Editors508 pmount - 0.1-1 (Newer...) Pending Hoary Editors
508509
509After the binary package go from PENDING->PUBLISHED, the page reflects the510After the binary package go from PENDING->PUBLISHED, the page reflects the
510changes:511changes:
@@ -521,7 +522,7 @@
521 Source Published Status Series Section Build522 Source Published Status Series Section Build
522 Status523 Status
523 pmount - 0.1-1 Pending Grumpy Editors524 pmount - 0.1-1 Pending Grumpy Editors
524 pmount - 0.1-1 Pending Hoary Editors525 pmount - 0.1-1 (Newer...) Pending Hoary Editors
525526
526If James performs exactly the same copy procedure again, a message527If James performs exactly the same copy procedure again, a message
527stating that all packages involved were already copied to the528stating that all packages involved were already copied to the
@@ -565,7 +566,7 @@
565 Source Published Status Series Section Build566 Source Published Status Series Section Build
566 Status567 Status
567 pmount - 0.1-1 Pending Grumpy Editors568 pmount - 0.1-1 Pending Grumpy Editors
568 pmount - 0.1-1 Deleted Hoary Editors569 pmount - 0.1-1 (Newer...) Deleted Hoary Editors
569570
570In the minute after James had deleted the package, he discovered that571In the minute after James had deleted the package, he discovered that
571'pmount' might work correctly in warty.572'pmount' might work correctly in warty.
@@ -593,7 +594,7 @@
593 Source Published Status Series Section Build594 Source Published Status Series Section Build
594 Status595 Status
595 pmount - 0.1-1 Pending Grumpy Editors596 pmount - 0.1-1 Pending Grumpy Editors
596 pmount - 0.1-1 Deleted Hoary Editors597 pmount - 0.1-1 (Newer...) Deleted Hoary Editors
597598
598James mistakenly requests the copy without including the binaries599James mistakenly requests the copy without including the binaries
599resulting from the hoary build, which are still published in grumpy.600resulting from the hoary build, which are still published in grumpy.
@@ -644,7 +645,7 @@
644 Status645 Status
645 pmount - 0.1-1 Pending Warty Editors646 pmount - 0.1-1 Pending Warty Editors
646 pmount - 0.1-1 Pending Grumpy Editors647 pmount - 0.1-1 Pending Grumpy Editors
647 pmount - 0.1-1 Deleted Hoary Editors648 pmount - 0.1-1 (Newer...) Deleted Hoary Editors
648649
649650
650=== Copying packages to other PPAs you participate ===651=== Copying packages to other PPAs you participate ===
@@ -744,7 +745,7 @@
744 Source Uploader Published Status Series Section Build745 Source Uploader Published Status Series Section Build
745 Status746 Status
746 iceweasel...(...) no signer Pending Hoary Editors747 iceweasel...(...) no signer Pending Hoary Editors
747 pmount - 0.1-1 no signer Pending Hoary Editors748 pmount...(...) no signer Pending Hoary Editors
748749
749James just gives a quick look to the details section of each copied750James just gives a quick look to the details section of each copied
750sources to ensure the binaries are really there.751sources to ensure the binaries are really there.
@@ -838,7 +839,7 @@
838 Status839 Status
839 pmount - 0.1-1 Pending Warty Editors840 pmount - 0.1-1 Pending Warty Editors
840 pmount - 0.1-1 Pending Grumpy Editors841 pmount - 0.1-1 Pending Grumpy Editors
841 pmount - 0.1-1 Deleted Hoary Editors842 pmount - 0.1-1 (Newer...) Deleted Hoary Editors
842843
843 >>> jblack_pub_ids = getPPAPubIDsFor('jblack')844 >>> jblack_pub_ids = getPPAPubIDsFor('jblack')
844845
@@ -924,10 +925,10 @@
924 >>> print_ppa_packages(jblack_browser.contents)925 >>> print_ppa_packages(jblack_browser.contents)
925 Source Published Status Series Section Build926 Source Published Status Series Section Build
926 Status927 Status
927 pmount - 0.1-1 Pending Hoary Editors928 pmount - 0.1-1 (Newer...) Pending Hoary Editors
928 pmount - 0.1-1 Pending Warty Editors929 pmount - 0.1-1 Pending Warty Editors
929 pmount - 0.1-1 Pending Grumpy Editors930 pmount - 0.1-1 Pending Grumpy Editors
930 pmount - 0.1-1 Deleted Hoary Editors931 pmount - 0.1-1 (Newer...) Deleted Hoary Editors
931932
932James is not yet satisfied and to create some fun we will publish933James is not yet satisfied and to create some fun we will publish
933different version of foo_1.0 in Mark's and Celso's PPAs and a foo_2.0934different version of foo_1.0 in Mark's and Celso's PPAs and a foo_2.0
@@ -1064,7 +1065,7 @@
1064 Status1065 Status
1065 foo - 2.0 (changesfile) Pending Hoary Base i3861066 foo - 2.0 (changesfile) Pending Hoary Base i386
1066 foo - 1.1 (changesfile) Pending Warty Base1067 foo - 1.1 (changesfile) Pending Warty Base
1067 pmount - 0.1-1 Pending Hoary Editors1068 pmount - 0.1-1 (Newer...) Pending Hoary Editors
1068 pmount - 0.1-1 Pending Warty Editors1069 pmount - 0.1-1 Pending Warty Editors
1069 pmount - 0.1-1 Pending Grumpy Editors1070 pmount - 0.1-1 Pending Grumpy Editors
10701071
10711072
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt'
--- lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-11-07 07:46:54 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-12-11 15:59:14 +0000
@@ -354,6 +354,36 @@
354 iceweasel 1.0 no signer (2007-07-09)354 iceweasel 1.0 no signer (2007-07-09)
355 pmount 0.1-1 no signer (2007-07-09)355 pmount 0.1-1 no signer (2007-07-09)
356356
357If a ppa package has been superseded by an package in the primary
358archive for the distroseries, this will be indicated with a link
359to the newer version.
360
361 # Publish a newer version of iceweasel in hoary.
362 >>> login('admin@canonical.com')
363 >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
364 >>> test_publisher = SoyuzTestPublisher()
365 >>> warty = getUtility(IDistributionSet)['ubuntu']['warty']
366 >>> test_publisher.prepareBreezyAutotest()
367 >>> new_version = test_publisher.getPubSource(
368 ... distroseries=warty, version="1.1", sourcename='iceweasel')
369 >>> import transaction
370 >>> transaction.commit()
371 >>> logout()
372
373 >>> anon_browser.reload()
374 >>> print_archive_package_rows(anon_browser.contents)
375 Package Version Uploaded by
376 cdrkit 1.0 no signer (2007-07-09)
377 commercialpackage 1.0-1 no signer
378 iceweasel 1.0 (Newer version available)
379 no signer (2007-07-09)
380 pmount 0.1-1 no signer (2007-07-09)
381
382The link itself will point to the newer version in the distro series.
383
384 >>> print anon_browser.getLink('Newer version').url
385 http://launchpad.dev/ubuntu/warty/+source/iceweasel/1.1
386
357A Latest updates portlet is included on the index page indicating the387A Latest updates portlet is included on the index page indicating the
358latest published sources with their states.388latest published sources with their states.
359389
@@ -417,7 +447,8 @@
417 Package Version Uploaded by447 Package Version Uploaded by
418 cdrkit 1.0 no signer (2007-07-09)448 cdrkit 1.0 no signer (2007-07-09)
419 commercialpackage 1.0-1 no signer449 commercialpackage 1.0-1 no signer
420 iceweasel 1.0 no signer (2007-07-09)450 iceweasel 1.0 (Newer version available)
451 no signer (2007-07-09)
421 pmount 0.1-1 no signer (2007-07-09)452 pmount 0.1-1 no signer (2007-07-09)
422453
423If the packages are filtered by a particular series, then the result454If the packages are filtered by a particular series, then the result
424455
=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
--- lib/lp/soyuz/templates/archive-index.pt 2009-11-27 20:47:00 +0000
+++ lib/lp/soyuz/templates/archive-index.pt 2009-12-11 15:59:14 +0000
@@ -252,17 +252,27 @@
252 </tr>252 </tr>
253 </thead>253 </thead>
254 <tbody>254 <tbody>
255 <tr tal:repeat="publishing batch">255 <tal:publishing repeat="publishing batch">
256 <tr tal:define="newer_version publishing/newer_distroseries_version"
257 tal:attributes="class python: newer_version and
258 'superseded' or ''">
256 <td>259 <td>
257 <img src="/@@/package-source" />260 <img src="/@@/package-source" />
258 <tal:source_name replace="publishing/sourcepackagerelease/name">261 <tal:source_name replace="publishing/sourcepackagerelease/name">
259 foo262 foo
260 </tal:source_name>263 </tal:source_name>
261 </td>264 </td>
262 <td tal:define="265 <td>
266 <tal:version define="
263 version_name publishing/meta_distroseriessourcepackagerelease/version;"267 version_name publishing/meta_distroseriessourcepackagerelease/version;"
264 tal:content="version_name">268 content="version_name">
265 2.0.39</td>269 2.0.39
270 </tal:version>
271 <tal:newer_version condition="newer_version">
272 (<a tal:attributes="href newer_version/fmt:url">Newer version</a>
273 available)
274 </tal:newer_version>
275 </td>
266 <td tal:define="spr publishing/sourcepackagerelease;276 <td tal:define="spr publishing/sourcepackagerelease;
267 signer spr/dscsigningkey/owner/fmt:link|string:no signer">277 signer spr/dscsigningkey/owner/fmt:link|string:no signer">
268 <span tal:replace="structure signer">Joe Bloggs</span>278 <span tal:replace="structure signer">Joe Bloggs</span>
@@ -274,6 +284,7 @@
274 </tal:date_published>284 </tal:date_published>
275 </td>285 </td>
276 </tr>286 </tr>
287 </tal:publishing>
277 </tbody>288 </tbody>
278 </table>289 </table>
279290
280291
=== modified file 'lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt'
--- lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2009-12-11 15:59:14 +0000
@@ -2,9 +2,11 @@
2 xmlns:tal="http://xml.zope.org/namespaces/tal"2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">5 omit-tag=""
6 define="newer_version context/newer_distroseries_version">
67
7 <tr class="archive_package_row">8 <tr tal:attributes="class python: ('archive_package_row ' + (
9 newer_version and 'superseded' or ''))">
8 <td style="white-space: nowrap">10 <td style="white-space: nowrap">
9 <input11 <input
10 name="field.selected_sources" type="checkbox"12 name="field.selected_sources" type="checkbox"
@@ -21,6 +23,11 @@
21 foo - 1.023 foo - 1.0
22 </tal:source_name>24 </tal:source_name>
23 </a>25 </a>
26
27 <tal:newer_version tal:condition="newer_version">
28 (<a tal:attributes="href newer_version/fmt:url">Newer version</a>
29 available)
30 </tal:newer_version>
24 </td>31 </td>
25 <td>32 <td>
26 <tal:view_changesfile33 <tal:view_changesfile

Subscribers

People subscribed via source and target branches

to status/vote changes: