launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #16657
[Merge] lp:~cjwatson/launchpad/build-behaviour-tidying into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/build-behaviour-tidying into lp:launchpad.
Commit message:
Clean up a few glitches in build behaviour code.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/build-behaviour-tidying/+merge/217214
These are a few trivial cleanups in build behaviours that I noticed while writing the livefs code.
--
https://code.launchpad.net/~cjwatson/launchpad/build-behaviour-tidying/+merge/217214
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/build-behaviour-tidying into lp:launchpad.
=== modified file 'lib/lp/buildmaster/model/buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2014-01-30 15:04:06 +0000
+++ lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2014-04-25 11:47:36 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Base and idle BuildFarmJobBehaviour classes."""
@@ -13,7 +13,6 @@
import gzip
import logging
import os
-import os.path
import tempfile
import transaction
=== modified file 'lib/lp/code/model/recipebuilder.py'
--- lib/lp/code/model/recipebuilder.py 2014-01-30 15:04:06 +0000
+++ lib/lp/code/model/recipebuilder.py 2014-04-25 11:47:36 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2013 Canonical Ltd. This software is licensed under the
+# Copyright 2010-2014 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Code to build recipes on the buildfarm."""
@@ -24,7 +24,6 @@
from lp.code.interfaces.sourcepackagerecipebuild import (
ISourcePackageRecipeBuild,
)
-from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.config import config
from lp.soyuz.adapters.archivedependencies import (
get_primary_current_component,
@@ -64,10 +63,7 @@
"""
# Build extra arguments.
args = {}
- suite = self.build.distroseries.name
- if self.build.pocket != PackagePublishingPocket.RELEASE:
- suite += "-%s" % (self.build.pocket.name.lower())
- args['suite'] = suite
+ args['suite'] = self.build.distroseries.getSuite(self.build.pocket)
args['arch_tag'] = distroarchseries.architecturetag
requester = self.build.requester
if requester.preferredemail is None:
=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipe.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipe.py 2013-11-19 09:27:01 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipe.py 2014-04-25 11:47:36 +0000
@@ -375,7 +375,7 @@
ppa.owner, distroseries, PackagePublishingPocket.RELEASE)
def test_requestBuildScore(self):
- """Normal build requests have a relatively low queue score (2405)."""
+ """Normal build requests have a relatively low queue score (2505)."""
recipe = self.factory.makeSourcePackageRecipe()
build = recipe.requestBuild(recipe.daily_build_archive,
recipe.owner, list(recipe.distroseries)[0],
@@ -385,7 +385,7 @@
self.assertEqual(2505, queue_record.lastscore)
def test_requestBuildManualScore(self):
- """Normal build requests have a score equivalent to binary builds."""
+ """Manual build requests have a score equivalent to binary builds."""
recipe = self.factory.makeSourcePackageRecipe()
build = recipe.requestBuild(recipe.daily_build_archive,
recipe.owner, list(recipe.distroseries)[0],
=== modified file 'lib/lp/soyuz/model/binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/model/binarypackagebuildbehaviour.py 2014-01-30 15:04:06 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehaviour.py 2014-04-25 11:47:36 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2014 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Builder behaviour for binary package builds."""
@@ -214,11 +214,8 @@
# this distroseries (in case it requires any archindep source)
args['arch_indep'] = build.distro_arch_series.isNominatedArchIndep
- suite = build.distro_arch_series.distroseries.name
- if build.pocket != PackagePublishingPocket.RELEASE:
- suite += "-%s" % (build.pocket.name.lower())
- args['suite'] = suite
-
+ args['suite'] = build.distro_arch_series.distroseries.getSuite(
+ build.pocket)
args['arch_tag'] = build.distro_arch_series.architecturetag
archive_purpose = build.archive.purpose
Follow ups