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

Proposed by Celso Providelo on 2009-09-20
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 2009-09-21 Approve on 2009-09-21
Henning Eggers (community) code 2009-09-20 Approve on 2009-09-21
Review via email: mp+12136@code.launchpad.net
To post a comment you must log in.
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-----

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)
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
1=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt'
2--- lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt 2009-09-18 15:42:19 +0000
3+++ lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt 2009-09-20 11:22:58 +0000
4@@ -176,3 +176,22 @@
5 >>> print extract_text(tag)
6 This archive has been disabled.
7
8+When a COPY archive gets enabled, No Privileges users can still access
9+it and the 'disabled' styling is gone.
10+
11+ >>> login('foo.bar@canonical.com')
12+ >>> disabled_archive.enabled = True
13+ >>> logout()
14+
15+ >>> nopriv_browser.reload()
16+
17+ >>> print nopriv_browser.title
18+ Copy archive disabled-security-rebuild for No Privileges Person : Ubuntu
19+
20+ >>> main_content = find_main_content(nopriv_browser.contents)
21+ >>> print main_content.h1
22+ <h1 id="displayname">...</h1>
23+
24+ >>> print first_tag_by_class(nopriv_browser.contents, 'warning message')
25+ None
26+
27
28=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
29--- lib/lp/soyuz/templates/archive-index.pt 2009-09-17 11:35:39 +0000
30+++ lib/lp/soyuz/templates/archive-index.pt 2009-09-20 11:22:58 +0000
31@@ -35,13 +35,15 @@
32 />
33 </div>
34
35- <metal:ppa-install
36- use-macro="template/macros/ppa-upload-hint-portlet" />
37+ <tal:ppa-upload-hint condition="context/is_ppa">
38+ <metal:ppa-upload-hint
39+ use-macro="template/macros/ppa-upload-hint-portlet" />
40+ </tal:ppa-upload-hint>
41
42 <div class="yui-gc">
43
44 <div class="yui-u first">
45- <tal:ppa-install tal:condition="context/is_ppa">
46+ <tal:ppa-install condition="context/is_ppa">
47 <metal:ppa-install
48 use-macro="template/macros/ppa-install-portlet" />
49 </tal:ppa-install>