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
=== modified file 'lib/lp/soyuz/doc/archive.txt'
--- lib/lp/soyuz/doc/archive.txt 2010-02-19 14:17:10 +0000
+++ lib/lp/soyuz/doc/archive.txt 2010-03-01 14:15:32 +0000
@@ -1474,7 +1474,7 @@
1474 >>> print copy_target.archive.is_copy1474 >>> print copy_target.archive.is_copy
1475 True1475 True
1476 >>> print copy_target.archive.archive_url1476 >>> print copy_target.archive.archive_url
1477 http://rebuild-test.internal/ubuntu-my-copy-archive1477 http://rebuild-test.internal/ubuntu-my-copy-archive/ubuntu
14781478
1479If the archive is private, the url may be different as private PPAs1479If the archive is private, the url may be different as private PPAs
1480are published to a secure location.1480are published to a secure location.
14811481
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2010-02-19 14:13:24 +0000
+++ lib/lp/soyuz/model/archive.py 2010-03-01 14:15:32 +0000
@@ -299,9 +299,10 @@
299 (self.owner.name, self.name, self.distribution.name)))299 (self.owner.name, self.name, self.distribution.name)))
300300
301 if self.is_copy:301 if self.is_copy:
302 return urlappend(302 url = urlappend(
303 config.archivepublisher.copy_base_url,303 config.archivepublisher.copy_base_url,
304 self.distribution.name + '-' + self.name)304 self.distribution.name + '-' + self.name)
305 return urlappend(url, self.distribution.name)
305306
306 try:307 try:
307 postfix = archive_postfixes[self.purpose]308 postfix = archive_postfixes[self.purpose]