Merge lp:~julian-edwards/launchpad/archive-url-bug-520520 into lp:launchpad

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~julian-edwards/launchpad/archive-url-bug-520520
Merge into: lp:launchpad
Diff against target: 28 lines (+3/-2)
2 files modified
lib/lp/soyuz/doc/archive.txt (+1/-1)
lib/lp/soyuz/model/archive.py (+2/-1)
To merge this branch: bzr merge lp:~julian-edwards/launchpad/archive-url-bug-520520
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Approve
Francis J. Lacoste (community) release-critical Approve
Review via email: mp+20369@code.launchpad.net

Commit message

Fix archive_url for copy archives, it was missing the distribution name at the end

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Summary =
Fix archive_url for copy archives - it was missing the distribution name at
the end

== Proposed fix ==
The IArchive.archive_url property for "copy" archives was missing the
distribution name as the last path component.

== Pre-implementation notes ==
Error found during QA!

== Implementation details ==
It's a trivial change ...

== Tests ==
bin/test -cvvt archive.txt

== Demo and Q/A ==

= 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/doc/archive.txt
  lib/lp/soyuz/model/archive.py

== Pylint notices ==

lib/lp/soyuz/model/archive.py
    14: [F0401] Unable to import 'lazr.lifecycle.event' (No module named
lifecycle)

Revision history for this message
Francis J. Lacoste (flacoste) :
review: Approve (release-critical)
Revision history for this message
Henning Eggers (henninge) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/doc/archive.txt'
2--- lib/lp/soyuz/doc/archive.txt 2010-02-19 14:17:10 +0000
3+++ lib/lp/soyuz/doc/archive.txt 2010-03-01 14:15:32 +0000
4@@ -1474,7 +1474,7 @@
5 >>> print copy_target.archive.is_copy
6 True
7 >>> print copy_target.archive.archive_url
8- http://rebuild-test.internal/ubuntu-my-copy-archive
9+ http://rebuild-test.internal/ubuntu-my-copy-archive/ubuntu
10
11 If the archive is private, the url may be different as private PPAs
12 are published to a secure location.
13
14=== modified file 'lib/lp/soyuz/model/archive.py'
15--- lib/lp/soyuz/model/archive.py 2010-02-19 14:13:24 +0000
16+++ lib/lp/soyuz/model/archive.py 2010-03-01 14:15:32 +0000
17@@ -299,9 +299,10 @@
18 (self.owner.name, self.name, self.distribution.name)))
19
20 if self.is_copy:
21- return urlappend(
22+ url = urlappend(
23 config.archivepublisher.copy_base_url,
24 self.distribution.name + '-' + self.name)
25+ return urlappend(url, self.distribution.name)
26
27 try:
28 postfix = archive_postfixes[self.purpose]