Merge lp:~abentley/launchpad/append-distroseries into lp:launchpad

Proposed by Aaron Bentley
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~abentley/launchpad/append-distroseries
Merge into: lp:launchpad
Diff against target: 127 lines (+15/-9)
6 files modified
lib/canonical/buildd/buildrecipe (+4/-2)
lib/canonical/buildd/sourcepackagerecipe.py (+4/-1)
lib/lp/code/model/recipebuilder.py (+3/-3)
lib/lp/code/tests/test_recipebuilder.py (+2/-1)
utilities/lp.pylintrc (+1/-1)
utilities/sourcedeps.conf (+1/-1)
To merge this branch: bzr merge lp:~abentley/launchpad/append-distroseries
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+23728@code.launchpad.net

Commit message

Append distroseries to debversion

Description of the change

= Summary =
Provide distroseries in debversion, to prevent builds that differ only by
distroseries from having the same debversion.

== Proposed fix ==
Require a newer version of bzr-builder which supports --append-version.
Pass the distroseries name into the buildd.
Call bzr-builder with --append-version $distroseries.

== Pre-implementation notes ==
Preimplementation was with james_w

== Implementation details ==
Various lint fixes were done as drivebys. Globally suppressed F0401, "Unable
to import", because it produces excessive false positives, and legitimate
instances of this issue would be caught by the test suite anyhow.

== Tests ==
bin/test test_recipebuilder

== Demo and Q/A ==
Should be tested on dogfood.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  utilities/lp.pylintrc
  lib/canonical/buildd/sourcepackagerecipe.py
  lib/canonical/buildd/buildrecipe
  utilities/sourcedeps.conf
  lib/lp/code/tests/test_recipebuilder.py
  lib/lp/code/model/recipebuilder.py

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Seems fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/buildd/buildrecipe'
--- lib/canonical/buildd/buildrecipe 2010-01-14 02:36:36 +0000
+++ lib/canonical/buildd/buildrecipe 2010-04-20 01:40:48 +0000
@@ -24,7 +24,7 @@
24 """Builds a package from a recipe."""24 """Builds a package from a recipe."""
2525
26 def __init__(self, build_id, author_name, author_email,26 def __init__(self, build_id, author_name, author_email,
27 package_name, suite):27 package_name, suite, distroseries_name):
28 """Constructor.28 """Constructor.
2929
30 :param build_id: The id of the build (a str).30 :param build_id: The id of the build (a str).
@@ -36,6 +36,7 @@
36 self.build_id = build_id36 self.build_id = build_id
37 self.author_name = author_name37 self.author_name = author_name
38 self.author_email = author_email38 self.author_email = author_email
39 self.distroseries_name = distroseries_name
39 self.package_name = package_name40 self.package_name = package_name
40 self.suite = suite41 self.suite = suite
41 self.base_branch = None42 self.base_branch = None
@@ -69,7 +70,8 @@
69 'sudo', '-u', self.username, 'DEBEMAIL=%s' % self.author_email,70 'sudo', '-u', self.username, 'DEBEMAIL=%s' % self.author_email,
70 'DEBFULLNAME=%s' % self.author_name, 'bzr', 'dailydeb',71 'DEBFULLNAME=%s' % self.author_name, 'bzr', 'dailydeb',
71 '--no-build', recipe_path_relative, self.tree_path_relative,72 '--no-build', recipe_path_relative, self.tree_path_relative,
72 '--manifest', manifest_path_relative])73 '--manifest', manifest_path_relative,
74 '--append-version', '~%s1' % self.distroseries_name])
73 if retcode != 0:75 if retcode != 0:
74 return retcode76 return retcode
75 (source,) = [name for name in os.listdir(self.tree_path)77 (source,) = [name for name in os.listdir(self.tree_path)
7678
=== modified file 'lib/canonical/buildd/sourcepackagerecipe.py'
--- lib/canonical/buildd/sourcepackagerecipe.py 2010-01-14 20:55:22 +0000
+++ lib/canonical/buildd/sourcepackagerecipe.py 2010-04-20 01:40:48 +0000
@@ -1,5 +1,6 @@
1# Copyright 2010 Canonical Ltd. This software is licensed under the1# Copyright 2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
3# pylint: disable-msg=E1002
34
4"""The manager class for building packages from recipes."""5"""The manager class for building packages from recipes."""
56
@@ -75,6 +76,7 @@
75 self.author_name = extra_args['author_name']76 self.author_name = extra_args['author_name']
76 self.author_email = extra_args['author_email']77 self.author_email = extra_args['author_email']
77 self.archive_purpose = extra_args['archive_purpose']78 self.archive_purpose = extra_args['archive_purpose']
79 self.distroseries_name = extra_args['distroseries_name']
7880
79 super(SourcePackageRecipeBuildManager, self).initiate(81 super(SourcePackageRecipeBuildManager, self).initiate(
80 files, chroot, extra_args)82 files, chroot, extra_args)
@@ -96,7 +98,8 @@
96 splat_file(recipe_path, self.recipe_text)98 splat_file(recipe_path, self.recipe_text)
97 args = [99 args = [
98 "buildrecipe.py", self._buildid, self.author_name,100 "buildrecipe.py", self._buildid, self.author_name,
99 self.author_email, self.package_name, self.suite]101 self.author_email, self.package_name, self.suite,
102 self.distroseries_name]
100 self.runSubProcess(self.build_recipe_path, args)103 self.runSubProcess(self.build_recipe_path, args)
101104
102 def iterate_BUILD_RECIPE(self, retcode):105 def iterate_BUILD_RECIPE(self, retcode):
103106
=== modified file 'lib/lp/code/model/recipebuilder.py'
--- lib/lp/code/model/recipebuilder.py 2010-04-12 05:52:01 +0000
+++ lib/lp/code/model/recipebuilder.py 2010-04-20 01:40:48 +0000
@@ -8,7 +8,7 @@
8 'RecipeBuildBehavior',8 'RecipeBuildBehavior',
9 ]9 ]
1010
11from zope.component import adapts, getUtility11from zope.component import adapts
12from zope.interface import implements12from zope.interface import implements
1313
14from lp.archiveuploader.permission import check_upload_to_pocket14from lp.archiveuploader.permission import check_upload_to_pocket
@@ -18,8 +18,7 @@
18from lp.buildmaster.model.buildfarmjobbehavior import (18from lp.buildmaster.model.buildfarmjobbehavior import (
19 BuildFarmJobBehaviorBase)19 BuildFarmJobBehaviorBase)
20from lp.code.interfaces.sourcepackagerecipebuild import (20from lp.code.interfaces.sourcepackagerecipebuild import (
21 ISourcePackageRecipeBuildJob, ISourcePackageRecipeBuildSource)21 ISourcePackageRecipeBuildJob)
22from lp.code.model.sourcepackagerecipebuild import SourcePackageRecipeBuild
23from lp.registry.interfaces.pocket import PackagePublishingPocket22from lp.registry.interfaces.pocket import PackagePublishingPocket
24from lp.soyuz.adapters.archivedependencies import (23from lp.soyuz.adapters.archivedependencies import (
25 get_primary_current_component, get_sources_list_for_building)24 get_primary_current_component, get_sources_list_for_building)
@@ -71,6 +70,7 @@
71 self.build.sourcepackagename.name)70 self.build.sourcepackagename.name)
72 args['archives'] = get_sources_list_for_building(self.build,71 args['archives'] = get_sources_list_for_building(self.build,
73 distroarchseries, self.build.sourcepackagename.name)72 distroarchseries, self.build.sourcepackagename.name)
73 args['distroseries_name'] = self.build.distroseries.name
74 return args74 return args
7575
76 def dispatchBuildToSlave(self, build_queue_id, logger):76 def dispatchBuildToSlave(self, build_queue_id, logger):
7777
=== modified file 'lib/lp/code/tests/test_recipebuilder.py'
--- lib/lp/code/tests/test_recipebuilder.py 2010-04-13 14:50:01 +0000
+++ lib/lp/code/tests/test_recipebuilder.py 2010-04-20 01:40:48 +0000
@@ -112,7 +112,8 @@
112 'recipe_text': '# bzr-builder format 0.2 deb-version 1.0\n'112 'recipe_text': '# bzr-builder format 0.2 deb-version 1.0\n'
113 'lp://dev/~joe/someapp/pkg\n',113 'lp://dev/~joe/someapp/pkg\n',
114 'archives': get_sources_list_for_building(job.build,114 'archives': get_sources_list_for_building(job.build,
115 distroarchseries, job.build.sourcepackagename.name)115 distroarchseries, job.build.sourcepackagename.name),
116 'distroseries_name': job.build.distroseries.name,
116 }, job._extraBuildArgs(distroarchseries))117 }, job._extraBuildArgs(distroarchseries))
117118
118 def test_dispatchBuildToSlave(self):119 def test_dispatchBuildToSlave(self):
119120
=== modified file 'utilities/lp.pylintrc'
--- utilities/lp.pylintrc 2009-06-24 20:15:50 +0000
+++ utilities/lp.pylintrc 2010-04-20 01:40:48 +0000
@@ -73,7 +73,7 @@
73# :W0621: *Redefining name %r from outer scope (line %s)* (pylint does a poor evaluation)73# :W0621: *Redefining name %r from outer scope (line %s)* (pylint does a poor evaluation)
74# :W0704: *Except does not do anything* (Does not check for comment explaining fall-through)74# :W0704: *Except does not do anything* (Does not check for comment explaining fall-through)
75# :E0611: *No name %r in module 'sqlobject'* (Pylint shipped with gutsy does not understand SQLObject. Pyflakes checks the imports too anyway.)75# :E0611: *No name %r in module 'sqlobject'* (Pylint shipped with gutsy does not understand SQLObject. Pyflakes checks the imports too anyway.)
76disable-msg=I0011,E0101,E0202,E0203,C0103,C0202,C0302,C0111,W0142,W0201,W0212,W0221,W0223,W0232,W0612,W0613,W0621,W0622,W0704,W0710,E061176disable-msg=I0011,E0101,E0202,E0203,C0103,C0202,C0302,C0111,W0142,W0201,W0212,W0221,W0223,W0232,W0612,W0613,W0621,W0622,W0704,W0710,E0611,F0401
7777
7878
79[REPORTS]79[REPORTS]
8080
=== modified file 'utilities/sourcedeps.conf'
--- utilities/sourcedeps.conf 2010-04-14 14:12:29 +0000
+++ utilities/sourcedeps.conf 2010-04-20 01:40:48 +0000
@@ -1,4 +1,4 @@
1bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=631bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=64
2bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=2532bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=253
3bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=2813bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=281
4bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=474bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=47