Merge lp:~stevenk/launchpad/fixes-bug-552560 into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merged at revision: 10986
Proposed branch: lp:~stevenk/launchpad/fixes-bug-552560
Merge into: lp:launchpad
Diff against target: 44 lines (+17/-0)
2 files modified
lib/lp/archivepublisher/publishing.py (+4/-0)
lib/lp/archivepublisher/tests/test_publisher.py (+13/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/fixes-bug-552560
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Approve
Review via email: mp+27126@code.launchpad.net

Description of the change

This branch changes the Origin and Label for the partner archive so that Ubuntu Software Centre can better show users which software comes from the partner archive on archive.canonical.com

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The only minor issue I see is that your comments are lacking dots at the end of the sentences.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/archivepublisher/publishing.py'
--- lib/lp/archivepublisher/publishing.py 2010-04-22 12:02:06 +0000
+++ lib/lp/archivepublisher/publishing.py 2010-06-10 08:24:33 +0000
@@ -428,6 +428,8 @@
428 """428 """
429 if self.archive.is_ppa:429 if self.archive.is_ppa:
430 return self.archive.displayname430 return self.archive.displayname
431 elif self.archive.purpose == ArchivePurpose.PARTNER:
432 return "Partner archive"
431 else:433 else:
432 return self.distro.displayname434 return self.distro.displayname
433435
@@ -443,6 +445,8 @@
443 """445 """
444 # XXX al-maisan, 2008-11-19, bug=299981. If this file is released446 # XXX al-maisan, 2008-11-19, bug=299981. If this file is released
445 # from a copy archive then modify the origin to indicate so.447 # from a copy archive then modify the origin to indicate so.
448 if self.archive.purpose == ArchivePurpose.PARTNER:
449 return "Canonical"
446 if not self.archive.is_ppa:450 if not self.archive.is_ppa:
447 return self.distro.displayname451 return self.distro.displayname
448 return "LP-PPA-%s" % get_ppa_reference(self.archive)452 return "LP-PPA-%s" % get_ppa_reference(self.archive)
449453
=== modified file 'lib/lp/archivepublisher/tests/test_publisher.py'
--- lib/lp/archivepublisher/tests/test_publisher.py 2010-06-08 14:03:59 +0000
+++ lib/lp/archivepublisher/tests/test_publisher.py 2010-06-10 08:24:33 +0000
@@ -1040,6 +1040,19 @@
1040 self.assertTrue('Sources.gz\n' in stringified_contents)1040 self.assertTrue('Sources.gz\n' in stringified_contents)
1041 self.assertTrue('Sources\n' in stringified_contents)1041 self.assertTrue('Sources\n' in stringified_contents)
10421042
1043 # Partner archive architecture Release files 'Origin' contain
1044 # a string
1045 arch_release_file = os.path.join(
1046 publisher._config.distsroot, 'breezy-autotest',
1047 'partner/source/Release')
1048 arch_release_contents = open(arch_release_file).read()
1049 self.assertEqual(
1050 self._getReleaseFileOrigin(arch_release_contents),
1051 'Canonical')
1052
1053 # The Label: field should be set to the archive displayname
1054 self.assertEqual(release_contents[1], 'Label: Partner archive')
1055
1043 def testWorldAndGroupReadablePackagesAndSources(self):1056 def testWorldAndGroupReadablePackagesAndSources(self):
1044 """Test Packages.gz and Sources.gz files are world and group readable.1057 """Test Packages.gz and Sources.gz files are world and group readable.
10451058