← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/livefs-series-pocket into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/livefs-series-pocket into lp:launchpad.

Commit message:
Pass series and pocket separately to the slave for livefs builds, rather than as a combined suite argument.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/livefs-series-pocket/+merge/224295

https://code.launchpad.net/~cjwatson/launchpad-buildd/fix-livefs-proposed/+merge/219961 arranged for launchpad-buildd to cope with the series and pocket being passed separately for livefs builds, rather than in a combined suite argument which it then just has to decompose again.  This switches over the master side so that we can get rid of the compatibility code in launchpad-buildd.
-- 
https://code.launchpad.net/~cjwatson/launchpad/livefs-series-pocket/+merge/224295
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/livefs-series-pocket into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/livefsbuildbehaviour.py'
--- lib/lp/soyuz/model/livefsbuildbehaviour.py	2014-06-18 18:28:10 +0000
+++ lib/lp/soyuz/model/livefsbuildbehaviour.py	2014-06-24 13:47:49 +0000
@@ -100,7 +100,8 @@
         args = dict(removeSecurityProxy(build.livefs.metadata))
         if build.metadata_override is not None:
             args.update(removeSecurityProxy(build.metadata_override))
-        args["suite"] = build.distro_series.getSuite(build.pocket)
+        args["series"] = build.distro_series.name
+        args["pocket"] = build.pocket.name.lower()
         args["arch_tag"] = build.distro_arch_series.architecturetag
         args["datestamp"] = build.version
         args["archives"] = get_sources_list_for_building(

=== modified file 'lib/lp/soyuz/tests/test_livefsbuildbehaviour.py'
--- lib/lp/soyuz/tests/test_livefsbuildbehaviour.py	2014-06-18 18:28:10 +0000
+++ lib/lp/soyuz/tests/test_livefsbuildbehaviour.py	2014-06-24 13:47:49 +0000
@@ -64,7 +64,7 @@
         super(TestLiveFSBuildBehaviour, self).setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: u"on"}))
 
-    def makeJob(self, **kwargs):
+    def makeJob(self, pocket=PackagePublishingPocket.RELEASE, **kwargs):
         """Create a sample `ILiveFSBuildBehaviour`."""
         distribution = self.factory.makeDistribution(name="distro")
         distroseries = self.factory.makeDistroSeries(
@@ -74,9 +74,8 @@
             distroseries=distroseries, architecturetag="i386",
             processor=processor)
         build = self.factory.makeLiveFSBuild(
-            distroarchseries=distroarchseries,
-            pocket=PackagePublishingPocket.RELEASE, name=u"test-livefs",
-            **kwargs)
+            distroarchseries=distroarchseries, pocket=pocket,
+            name=u"test-livefs", **kwargs)
         return IBuildFarmJobBehaviour(build)
 
     def test_provides_interface(self):
@@ -203,11 +202,22 @@
             "archives": expected_archives,
             "arch_tag": "i386",
             "datestamp": "20140425-103800",
+            "pocket": "release",
             "project": "distro",
             "subproject": "special",
-            "suite": "unstable",
+            "series": "unstable",
             }, job._extraBuildArgs())
 
+    def test_extraBuildArgs_proposed(self):
+        # _extraBuildArgs returns appropriate arguments if asked to build a
+        # job for -proposed.
+        job = self.makeJob(
+            pocket=PackagePublishingPocket.PROPOSED,
+            metadata={"project": "distro"})
+        args = job._extraBuildArgs()
+        self.assertEqual("unstable", args["series"])
+        self.assertEqual("proposed", args["pocket"])
+
     def test_extraBuildArgs_no_security_proxy(self):
         # _extraBuildArgs returns an object without security wrapping, even
         # if values in the metadata are (say) lists and hence get proxied by


Follow ups