Merge lp:~cprov/launchpad/bug-432979-copy-archives into lp:launchpad

Proposed by Celso Providelo
Status: Merged
Merged at revision: not available
Proposed branch: lp:~cprov/launchpad/bug-432979-copy-archives
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~cprov/launchpad/bug-432979-copy-archives
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Henning Eggers (community) code Approve
Review via email: mp+12136@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

= Summary =

This branch fixes https://bugs.edge.launchpad.net/soyuz/+bug/432979 suppressing the 'upload-hint' section for non-PPA archives.

The assertion on the view should be kept since it's correct, i.e. the 'ppa_reference' should only be used with PPA archives.

This change is an RC in 3.0 (small and isolated enough and fixes on OOPS).

== Tests ==

./bin/test -vv -t xx-distribution-archives.txt

== Demo and Q/A ==

1. Create an COPY archive:

{{{
./scripts/populate-archive.py --from-suite hoary -s hoary -a 386 --to-archive test-1 --to-user cprov --reason 'yeah!'
}}}

2. Log in as <email address hidden>

3. Access https://launchpad.dev/ubuntu/+archive/test-1

= 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/archive-index.pt
  lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkq2E40ACgkQ7KBXuXyZSjCFhQCeMacB1VEFrjIKjHiRTSauBsF+
77oAoIbCrZPjw13SPksiXp0bqFpRULZx
=o/sH
-----END PGP SIGNATURE-----

Revision history for this message
Henning Eggers (henninge) wrote :

Thanks for such a nice and small branch. ;-) Sorry it took so long for me to get to it.

You checked if the tal:condition could be added directly to the metal:ppa-upload-hint tag but that didn't work. Thanks for going after that, though!

Good luck with the r-c! ;)

Henning

review: Approve (code)
Revision history for this message
Brad Crittenden (bac) wrote :

Thanks for the fix Celso. Please land against devel.

review: Approve (release-critical)

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-distribution-archives.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt 2009-09-18 15:42:19 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt 2009-09-20 11:22:58 +0000
@@ -176,3 +176,22 @@
176 >>> print extract_text(tag)176 >>> print extract_text(tag)
177 This archive has been disabled.177 This archive has been disabled.
178178
179When a COPY archive gets enabled, No Privileges users can still access
180it and the 'disabled' styling is gone.
181
182 >>> login('foo.bar@canonical.com')
183 >>> disabled_archive.enabled = True
184 >>> logout()
185
186 >>> nopriv_browser.reload()
187
188 >>> print nopriv_browser.title
189 Copy archive disabled-security-rebuild for No Privileges Person : Ubuntu
190
191 >>> main_content = find_main_content(nopriv_browser.contents)
192 >>> print main_content.h1
193 <h1 id="displayname">...</h1>
194
195 >>> print first_tag_by_class(nopriv_browser.contents, 'warning message')
196 None
197
179198
=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
--- lib/lp/soyuz/templates/archive-index.pt 2009-09-17 11:35:39 +0000
+++ lib/lp/soyuz/templates/archive-index.pt 2009-09-20 11:22:58 +0000
@@ -35,13 +35,15 @@
35 />35 />
36 </div>36 </div>
3737
38 <metal:ppa-install38 <tal:ppa-upload-hint condition="context/is_ppa">
39 use-macro="template/macros/ppa-upload-hint-portlet" />39 <metal:ppa-upload-hint
40 use-macro="template/macros/ppa-upload-hint-portlet" />
41 </tal:ppa-upload-hint>
4042
41 <div class="yui-gc">43 <div class="yui-gc">
4244
43 <div class="yui-u first">45 <div class="yui-u first">
44 <tal:ppa-install tal:condition="context/is_ppa">46 <tal:ppa-install condition="context/is_ppa">
45 <metal:ppa-install47 <metal:ppa-install
46 use-macro="template/macros/ppa-install-portlet" />48 use-macro="template/macros/ppa-install-portlet" />
47 </tal:ppa-install>49 </tal:ppa-install>