← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/bpph-phase-2 into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/bpph-phase-2 into lp:launchpad.

Commit message:
Fix ordering of binary overrides.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1100748 in Launchpad itself: "Support phased updates via Phased-Update-Percentage control field"
  https://bugs.launchpad.net/launchpad/+bug/1100748

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/bpph-phase-2/+merge/150690

== Summary ==

I messed up the archivepublisher code in https://code.launchpad.net/~cjwatson/launchpad/bpph-phase/+merge/144154 slightly and only found out about it in QA.  This branch corrects my embarrassment.
-- 
https://code.launchpad.net/~cjwatson/launchpad/bpph-phase-2/+merge/150690
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/bpph-phase-2 into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/model/ftparchive.py'
--- lib/lp/archivepublisher/model/ftparchive.py	2013-02-13 14:14:04 +0000
+++ lib/lp/archivepublisher/model/ftparchive.py	2013-02-26 23:14:23 +0000
@@ -276,7 +276,7 @@
         """Fetch override information about all published binaries.
 
         The override information consists of tuples with 'binaryname',
-        'architecture', 'component', 'section' and 'priority' strings and
+        'component', 'section', 'architecture' and 'priority' strings and
         'phased_update_percentage' integers, in this order.
 
         :param distroseries: target `IDistroSeries`
@@ -307,8 +307,8 @@
             return EmptyResultSet()
 
         result_set = store.using(*origins).find(
-            (BinaryPackageName.name, DistroArchSeries.architecturetag,
-             Component.name, Section.name,
+            (BinaryPackageName.name, Component.name, Section.name,
+             DistroArchSeries.architecturetag,
              BinaryPackagePublishingHistory.priority,
              BinaryPackagePublishingHistory.phased_update_percentage),
             BinaryPackagePublishingHistory.archive == self.publisher.archive,

=== modified file 'lib/lp/archivepublisher/tests/test_ftparchive.py'
--- lib/lp/archivepublisher/tests/test_ftparchive.py	2013-01-21 16:28:14 +0000
+++ lib/lp/archivepublisher/tests/test_ftparchive.py	2013-02-26 23:14:23 +0000
@@ -179,7 +179,8 @@
 
     def test_getBinariesForOverrides(self):
         # getBinariesForOverrides returns a list of tuples containing:
-        # (sourcename, component, section, priority)
+        # (sourcename, component, section, archtag, priority,
+        # phased_update_percentage)
 
         # Reconfigure FTPArchiveHandler to retrieve sampledata overrides.
         fa = self._setUpFTPArchiveHandler()
@@ -190,9 +191,9 @@
         published_binaries = fa.getBinariesForOverrides(
             hoary, PackagePublishingPocket.RELEASE)
         expectedBinaries = [
-            ('pmount', 'hppa', 'main', 'base',
+            ('pmount', 'main', 'base', 'hppa',
              PackagePublishingPriority.EXTRA, None),
-            ('pmount', 'i386', 'universe', 'editors',
+            ('pmount', 'universe', 'editors', 'i386',
              PackagePublishingPriority.IMPORTANT, None),
             ]
         self.assertEqual(expectedBinaries, list(published_binaries))


Follow ups