Merge lp:~abentley/launchpad/binary-to-recipe into lp:launchpad

Proposed by Aaron Bentley on 2010-06-01
Status: Merged
Approved by: Edwin Grubbs on 2010-06-02
Approved revision: no longer in the source branch.
Merged at revision: 10946
Proposed branch: lp:~abentley/launchpad/binary-to-recipe
Merge into: lp:launchpad
Diff against target: 51 lines (+30/-0)
2 files modified
lib/lp/soyuz/stories/soyuz/xx-build-record.txt (+23/-0)
lib/lp/soyuz/templates/build-index.pt (+7/-0)
To merge this branch: bzr merge lp:~abentley/launchpad/binary-to-recipe
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) 2010-06-01 Approve on 2010-06-02
Review via email: mp+26537@code.launchpad.net

Commit message

Link to source package recipe builds from their binaries.

Description of the change

= Summary =
Fix bug #583408: Binary package builds should link to the related source
package recipe build

== Proposed fix ==
Add a link to the source package recipe build page from binary package build
index page to the source package recipe build page if there was one.

== Pre-implementation notes ==
None

== Implementation details ==
Pretty straightforward

== Tests ==
bin/test -t xx-build-record.txt

== Demo and Q/A ==
Perform a source package recipe build. Wait until binary packages resuilt. Go
to a binary package page. Follow the link back to the source package recipe
build.

= 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/templates/build-index.pt
  lib/lp/soyuz/stories/soyuz/xx-build-record.txt

To post a comment you must log in.
Edwin Grubbs (edwin-grubbs) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
2--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2010-05-17 15:03:59 +0000
3+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2010-06-04 14:01:32 +0000
4@@ -516,6 +516,29 @@
5 ...
6 LinkNotFoundError
7
8+If the source package was created from a recipe build, link to it.
9+
10+ >>> login('foo.bar@canonical.com')
11+ >>> product = factory.makeProduct(name='product')
12+ >>> branch = factory.makeProductBranch(
13+ ... owner=cprov, product=product, name='mybranch')
14+ >>> recipe = factory.makeSourcePackageRecipe(
15+ ... owner=cprov, name=u'myrecipe', branches=[branch])
16+ >>> ppa_source.sourcepackagerelease.source_package_recipe_build = (
17+ ... factory.makeSourcePackageRecipeBuild(recipe=recipe,
18+ ... archive=cprov.archive))
19+ >>> logout()
20+ >>> anon_browser.open(ppa_build_url)
21+ >>> print extract_text(find_tag_by_id(anon_browser.contents, 'details'))
22+ Build details
23+ ...
24+ Source package recipe build:
25+ ~cprov/product/mybranch recipe build [cprov/ppa]
26+ ...
27+
28+ >>> print anon_browser.getLink('~cprov/product/mybranch recipe build').url
29+ http://code.launchpad.dev/~cprov/+recipe/myrecipe/+build/1
30+
31 Finally, the 'Build files' section is identical for PPA builds.
32
33 >>> print extract_text(
34
35=== modified file 'lib/lp/soyuz/templates/build-index.pt'
36--- lib/lp/soyuz/templates/build-index.pt 2010-05-14 08:45:43 +0000
37+++ lib/lp/soyuz/templates/build-index.pt 2010-06-04 14:01:32 +0000
38@@ -78,6 +78,13 @@
39 tal:attributes="href dspr/fmt:url">firefox - 1.0</a>
40 </dd>
41 </dl>
42+ <dl
43+ tal:define="spr context/sourcepackagerelease"
44+ tal:condition="spr/source_package_recipe_build">
45+ <dt>Source package recipe build:</dt>
46+ <dd tal:content="structure spr/source_package_recipe_build/fmt:link">
47+ </dd>
48+ </dl>
49 <dl>
50 <dt>Archive:</dt>
51 <dd>