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

Proposed by Aaron Bentley
Status: Merged
Approved by: Edwin Grubbs
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) Approve
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.
Revision history for this message
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
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2010-05-17 15:03:59 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2010-06-04 14:01:32 +0000
@@ -516,6 +516,29 @@
516 ...516 ...
517 LinkNotFoundError517 LinkNotFoundError
518518
519If the source package was created from a recipe build, link to it.
520
521 >>> login('foo.bar@canonical.com')
522 >>> product = factory.makeProduct(name='product')
523 >>> branch = factory.makeProductBranch(
524 ... owner=cprov, product=product, name='mybranch')
525 >>> recipe = factory.makeSourcePackageRecipe(
526 ... owner=cprov, name=u'myrecipe', branches=[branch])
527 >>> ppa_source.sourcepackagerelease.source_package_recipe_build = (
528 ... factory.makeSourcePackageRecipeBuild(recipe=recipe,
529 ... archive=cprov.archive))
530 >>> logout()
531 >>> anon_browser.open(ppa_build_url)
532 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'details'))
533 Build details
534 ...
535 Source package recipe build:
536 ~cprov/product/mybranch recipe build [cprov/ppa]
537 ...
538
539 >>> print anon_browser.getLink('~cprov/product/mybranch recipe build').url
540 http://code.launchpad.dev/~cprov/+recipe/myrecipe/+build/1
541
519Finally, the 'Build files' section is identical for PPA builds.542Finally, the 'Build files' section is identical for PPA builds.
520543
521 >>> print extract_text(544 >>> print extract_text(
522545
=== modified file 'lib/lp/soyuz/templates/build-index.pt'
--- lib/lp/soyuz/templates/build-index.pt 2010-05-14 08:45:43 +0000
+++ lib/lp/soyuz/templates/build-index.pt 2010-06-04 14:01:32 +0000
@@ -78,6 +78,13 @@
78 tal:attributes="href dspr/fmt:url">firefox - 1.0</a>78 tal:attributes="href dspr/fmt:url">firefox - 1.0</a>
79 </dd>79 </dd>
80 </dl>80 </dl>
81 <dl
82 tal:define="spr context/sourcepackagerelease"
83 tal:condition="spr/source_package_recipe_build">
84 <dt>Source package recipe build:</dt>
85 <dd tal:content="structure spr/source_package_recipe_build/fmt:link">
86 </dd>
87 </dl>
81 <dl>88 <dl>
82 <dt>Archive:</dt>89 <dt>Archive:</dt>
83 <dd>90 <dd>