launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19752
[Merge] lp:~cjwatson/launchpad/delete-more-component-ui into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/delete-more-component-ui into lp:launchpad.
Commit message:
Remove some more uses of the confusing .dsc component. Add the publishing component to SourcePackage:+index in compensation.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/delete-more-component-ui/+merge/278393
Remove some more uses of the confusing .dsc component, this time in DistributionSourcePackageRelease:+index and SourcePackage:+portlet-details. As with https://code.launchpad.net/~cjwatson/launchpad/delete-dsp-component-ui/+merge/270169, showing it does more harm than good, e.g.:
http://irclogs.ubuntu.com/2015/11/23/%23ubuntu-devel.html#t16:16
In compensation, add the publishing component to the publishing history summary on SourcePackage:+index, since it makes some degree of sense there and is useful for the same kind of reason it's useful in other publishing history views. It's already shown elsewhere on DistributionSourcePackageRelease:+index.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/delete-more-component-ui into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/sourcepackage.py'
--- lib/lp/registry/interfaces/sourcepackage.py 2015-10-12 16:16:28 +0000
+++ lib/lp/registry/interfaces/sourcepackage.py 2015-11-24 01:59:56 +0000
@@ -154,7 +154,8 @@
published_by_pocket = Attribute("The set of source package releases "
"currently published in this distro series, organised by "
"pocket. The result is a dictionary, with the pocket dbschema "
- "as a key, and a list of source package releases as the value.")
+ "as a key, and a list of {'spr': source package release, "
+ "'component_name': component name} as the value.")
linked_branches = Attribute(
"A mapping of pockets to officially linked branches, ordered by "
=== modified file 'lib/lp/registry/model/sourcepackage.py'
--- lib/lp/registry/model/sourcepackage.py 2015-10-12 16:16:28 +0000
+++ lib/lp/registry/model/sourcepackage.py 2015-11-24 01:59:56 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Database classes that implement SourcePackage items."""
@@ -422,9 +422,11 @@
thedict[pocket] = []
# add all the sourcepackagereleases in the right place
for spph in result:
- thedict[spph.pocket].append(
- spph.distroseries.distribution.getSourcePackageRelease(
- spph.sourcepackagerelease))
+ thedict[spph.pocket].append({
+ 'spr': spph.distroseries.distribution.getSourcePackageRelease(
+ spph.sourcepackagerelease),
+ 'component_name': spph.component_name,
+ })
return thedict
@property
=== modified file 'lib/lp/registry/templates/sourcepackage-index.pt'
--- lib/lp/registry/templates/sourcepackage-index.pt 2014-11-09 01:48:36 +0000
+++ lib/lp/registry/templates/sourcepackage-index.pt 2015-11-24 01:59:56 +0000
@@ -38,9 +38,10 @@
The description of the pocket.
</p>
<ul>
- <li tal:repeat="spr pocket/packages">
- <a tal:content="spr/displayname"
- tal:attributes="href spr/fmt:url">apache2</a>
+ <li tal:repeat="package pocket/packages">
+ <a tal:content="package/spr/displayname"
+ tal:attributes="href package/spr/fmt:url">apache2</a>
+ (<span tal:content="package/component_name">main</span>)
</li>
</ul>
</dd>
=== modified file 'lib/lp/registry/templates/sourcepackage-portlet-details.pt'
--- lib/lp/registry/templates/sourcepackage-portlet-details.pt 2009-09-14 04:24:20 +0000
+++ lib/lp/registry/templates/sourcepackage-portlet-details.pt 2015-11-24 01:59:56 +0000
@@ -24,10 +24,6 @@
<dt>Urgency:</dt>
<dd><span tal:content="current/urgency/title" /></dd>
</dl>
- <dl>
- <dt>Component:</dt>
- <dd><span tal:content="current/component/name"/></dd>
- </dl>
</tal:currentrelease>
<tal:norelease tal:condition="not: current">
<em>No published releases of this package have been uploaded in
=== modified file 'lib/lp/soyuz/browser/tests/sourcepackage-views.txt'
--- lib/lp/soyuz/browser/tests/sourcepackage-views.txt 2015-07-30 09:02:18 +0000
+++ lib/lp/soyuz/browser/tests/sourcepackage-views.txt 2015-11-24 01:59:56 +0000
@@ -27,16 +27,20 @@
[
{'pocketdetails': PackagePublishingPocket,
- 'packages': [IDistributionSourcePackageRelease, ...]}
+ 'packages': [
+ {'spr': IDistributionSourcePackageRelease, 'component_name': 'main'},
+ ...
+ ]}
...
]
Each pocket should only contain packages marked as PUBLISHED.
>>> for pub in pmount_view.published_by_pocket():
- ... pkg_versions = [p.version for p in pub['packages']]
+ ... pkg_versions = [
+ ... (p['spr'].version, p['component_name']) for p in pub['packages']]
... print pub['pocketdetails'].title, sorted(pkg_versions)
- Release [u'0.1-2']
+ Release [(u'0.1-2', u'main')]
Security []
Updates []
Proposed []
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt 2015-10-05 06:34:17 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt 2015-11-24 01:59:56 +0000
@@ -105,8 +105,6 @@
Breezy Badger Autotest
Original maintainer:
Maintainer
- Component:
- main
Architectures:
all
Section:
=== modified file 'lib/lp/soyuz/templates/distributionsourcepackagerelease-index.pt'
--- lib/lp/soyuz/templates/distributionsourcepackagerelease-index.pt 2014-11-09 21:51:44 +0000
+++ lib/lp/soyuz/templates/distributionsourcepackagerelease-index.pt 2015-11-24 01:59:56 +0000
@@ -55,10 +55,6 @@
>Foo Bar</dd>
</dl>
<dl>
- <dt>Component:</dt>
- <dd tal:content="context/component/name">main</dd>
- </dl>
- <dl>
<dt>Architectures:</dt>
<dd tal:content="context/architecturehintlist">i386, ppc</dd>
</dl>
Follow ups