Merge lp:~wgrant/launchpad/multi-arch-builders into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 11306
Proposed branch: lp:~wgrant/launchpad/multi-arch-builders
Merge into: lp:launchpad
Diff against target: 415 lines (+40/-108)
17 files modified
lib/canonical/buildd/binarypackage.py (+2/-1)
lib/canonical/buildd/debian.py (+5/-4)
lib/canonical/buildd/debian/changelog (+7/-0)
lib/canonical/buildd/sbuild (+3/-0)
lib/canonical/buildd/sbuild-package (+3/-7)
lib/canonical/buildd/sbuildrc (+1/-1)
lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py (+3/-0)
lib/canonical/buildd/update-debian-chroot (+2/-6)
lib/lp/buildmaster/doc/builder.txt (+0/-34)
lib/lp/buildmaster/interfaces/builder.py (+0/-14)
lib/lp/buildmaster/model/builder.py (+1/-36)
lib/lp/buildmaster/tests/test_manager.py (+1/-0)
lib/lp/code/model/recipebuilder.py (+1/-0)
lib/lp/code/model/tests/test_recipebuilder.py (+2/-0)
lib/lp/soyuz/model/binarypackagebuildbehavior.py (+2/-0)
lib/lp/soyuz/tests/soyuzbuilddhelpers.py (+0/-3)
lib/lp/translations/model/translationtemplatesbuildbehavior.py (+7/-2)
To merge this branch: bzr merge lp:~wgrant/launchpad/multi-arch-builders
Reviewer Review Type Date Requested Status
Jeroen T. Vermeulen (community) Approve
Review via email: mp+31740@code.launchpad.net

Commit message

The architecture of a build slave can now be set through the web UI, and the slave will respect the setting.

Description of the change

This branch mostly fixes bug #491418, adjusting launchpad-buildd to take an optional arch_tag extra argument, which is then used when dealing with the chroot and performing the actual build. This lets buildd-manager decide which architecture it needs a slave to be for a particular build.

The master support for this is incomplete: in this branch, builders must have their architecture tweaked manually through the UI. The master's slave architecture check has also been removed, which means that an incorrect architecture setting could result in chroot setup failures rather than the current builder failure.

Eventually the master will be able to dynamically assign builds of different architectures to the same builder, but that requires more work.

To post a comment you must log in.
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Looks good. Can't judge all the consequences, but that's not what a review is for.

Can't think of anything to fix either. Go clean up some lint or something.

Jeroen

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/buildd/binarypackage.py'
--- lib/canonical/buildd/binarypackage.py 2010-06-12 03:48:34 +0000
+++ lib/canonical/buildd/binarypackage.py 2010-08-05 21:16:05 +0000
@@ -67,7 +67,7 @@
6767
68 def doRunBuild(self):68 def doRunBuild(self):
69 """Run the sbuild process to build the package."""69 """Run the sbuild process to build the package."""
70 args = ["sbuild-package", self._buildid ]70 args = ["sbuild-package", self._buildid, self.arch_tag]
71 if self.suite:71 if self.suite:
72 args.extend([self.suite])72 args.extend([self.suite])
73 args.extend(self._sbuildargs)73 args.extend(self._sbuildargs)
@@ -82,6 +82,7 @@
82 args.extend(["--purpose=" + self.archive_purpose])82 args.extend(["--purpose=" + self.archive_purpose])
83 if self.build_debug_symbols:83 if self.build_debug_symbols:
84 args.extend(["--build-debug-symbols"])84 args.extend(["--build-debug-symbols"])
85 args.extend(["--architecture=" + self.arch_tag])
85 args.extend(["--comp=" + self.component])86 args.extend(["--comp=" + self.component])
86 args.extend([self._dscfile])87 args.extend([self._dscfile])
87 self.runSubProcess( self._sbuildpath, args )88 self.runSubProcess( self._sbuildpath, args )
8889
=== modified file 'lib/canonical/buildd/debian.py'
--- lib/canonical/buildd/debian.py 2010-06-12 03:48:34 +0000
+++ lib/canonical/buildd/debian.py 2010-08-05 21:16:05 +0000
@@ -47,6 +47,7 @@
47 def initiate(self, files, chroot, extra_args):47 def initiate(self, files, chroot, extra_args):
48 """Initiate a build with a given set of files and chroot."""48 """Initiate a build with a given set of files and chroot."""
4949
50 self.arch_tag = extra_args.get('arch_tag', self._slave.getArch())
50 self.sources_list = extra_args.get('archives')51 self.sources_list = extra_args.get('archives')
5152
52 BuildManager.initiate(self, files, chroot, extra_args)53 BuildManager.initiate(self, files, chroot, extra_args)
@@ -62,8 +63,9 @@
6263
63 def doUpdateChroot(self):64 def doUpdateChroot(self):
64 """Perform the chroot upgrade."""65 """Perform the chroot upgrade."""
65 self.runSubProcess(self._updatepath,66 self.runSubProcess(
66 ["update-debian-chroot", self._buildid])67 self._updatepath,
68 ["update-debian-chroot", self._buildid, self.arch_tag])
6769
68 def doRunBuild(self):70 def doRunBuild(self):
69 """Run the main build process.71 """Run the main build process.
@@ -95,8 +97,7 @@
95 yield filename97 yield filename
9698
97 def getChangesFilename(self):99 def getChangesFilename(self):
98 changes = (100 changes = self._dscfile[:-4] + "_" + self.arch_tag + ".changes"
99 self._dscfile[:-4] + "_" + self._slave.getArch() + ".changes")
100 return get_build_path(self._buildid, changes)101 return get_build_path(self._buildid, changes)
101102
102 def gatherResults(self):103 def gatherResults(self):
103104
=== modified file 'lib/canonical/buildd/debian/changelog'
--- lib/canonical/buildd/debian/changelog 2010-07-23 20:23:04 +0000
+++ lib/canonical/buildd/debian/changelog 2010-08-05 21:16:05 +0000
@@ -1,3 +1,10 @@
1launchpad-buildd (68) UNRELEASED; urgency=low
2
3 * Take an 'arch_tag' argument, so the master can override the slave
4 architecture.
5
6 -- William Grant <wgrant@ubuntu.com> Sun, 01 Aug 2010 22:00:32 +1000
7
1launchpad-buildd (67) hardy-cat; urgency=low8launchpad-buildd (67) hardy-cat; urgency=low
29
3 * Force aptitude installation for recipe builds on maverick10 * Force aptitude installation for recipe builds on maverick
411
=== modified file 'lib/canonical/buildd/sbuild'
--- lib/canonical/buildd/sbuild 2010-07-19 18:14:54 +0000
+++ lib/canonical/buildd/sbuild 2010-08-05 21:16:05 +0000
@@ -564,6 +564,9 @@
564 $main::build_source++;564 $main::build_source++;
565 $conf::purge_build_directory = "never";565 $conf::purge_build_directory = "never";
566 }566 }
567 elsif (/^--architecture=(.)/) {
568 $conf::arch=$1.$';
569 }
567 elsif (/^--archive=(.)/) {570 elsif (/^--archive=(.)/) {
568 $main::archive=$1.$';571 $main::archive=$1.$';
569 }572 }
570573
=== modified file 'lib/canonical/buildd/sbuild-package'
--- lib/canonical/buildd/sbuild-package 2010-01-11 23:03:50 +0000
+++ lib/canonical/buildd/sbuild-package 2010-08-05 21:16:05 +0000
@@ -20,8 +20,9 @@
20SBUILD=/usr/bin/sbuild20SBUILD=/usr/bin/sbuild
21BUILDID=$121BUILDID=$1
22SUITE=$222SUITE=$2
23ARCHITECTURETAG=$3
2324
24shift; shift25shift 3
2526
26export NR_PROCESSORS=$(grep ^processor /proc/cpuinfo | wc -l)27export NR_PROCESSORS=$(grep ^processor /proc/cpuinfo | wc -l)
2728
@@ -34,11 +35,6 @@
34cd "$HOME/build-$BUILDID"35cd "$HOME/build-$BUILDID"
3536
36hostarch=$(dpkg --print-architecture)37hostarch=$(dpkg --print-architecture)
37architecturetag=$hostarch
38
39if [ -f /etc/launchpad-buildd/default ]; then
40 eval `grep architecturetag /etc/launchpad-buildd/default | sed 's/ //g'`
41fi
4238
43WARN=""39WARN=""
44case $hostarch in40case $hostarch in
@@ -51,7 +47,7 @@
51 WARN="--warnonly"47 WARN="--warnonly"
52 ;;48 ;;
53 amd64)49 amd64)
54 if [ "$hostarch" != "$architecturetag" ]; then50 if [ "$hostarch" != "$ARCHITECTURETAG" ]; then
55 SBUILD="linux32 $SBUILD"51 SBUILD="linux32 $SBUILD"
56 WARN="--warnonly"52 WARN="--warnonly"
57 fi53 fi
5854
=== modified file 'lib/canonical/buildd/sbuildrc'
--- lib/canonical/buildd/sbuildrc 2009-12-15 00:19:56 +0000
+++ lib/canonical/buildd/sbuildrc 2010-08-05 21:16:05 +0000
@@ -9,7 +9,7 @@
9$arch="@ARCHTAG@";9$arch="@ARCHTAG@";
1010
11# Maintainer name to use in .changes files (mandatory, no default!)11# Maintainer name to use in .changes files (mandatory, no default!)
12$maintainer_name="Ubuntu/$arch Build Daemon <buildd\@@FQDN@>";12$maintainer_name="Ubuntu Build Daemon <buildd\@@FQDN@>";
1313
14# When to purge the build directory afterwards; possible values are14# When to purge the build directory afterwards; possible values are
15# "never", "successful", and "always"15# "never", "successful", and "always"
1616
=== modified file 'lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py'
--- lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py 2010-04-01 09:31:13 +0000
+++ lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py 2010-08-05 21:16:05 +0000
@@ -43,6 +43,9 @@
43 def wasCalled(self, name):43 def wasCalled(self, name):
44 return name in self._was_called44 return name in self._was_called
4545
46 def getArch(self):
47 return 'i386'
48
46 addWaitingFile = FakeMethod()49 addWaitingFile = FakeMethod()
4750
4851
4952
=== modified file 'lib/canonical/buildd/update-debian-chroot'
--- lib/canonical/buildd/update-debian-chroot 2009-12-15 18:42:11 +0000
+++ lib/canonical/buildd/update-debian-chroot 2010-08-05 21:16:05 +0000
@@ -15,6 +15,7 @@
15CHROOT=/usr/sbin/chroot15CHROOT=/usr/sbin/chroot
16APTGET=/usr/bin/apt-get16APTGET=/usr/bin/apt-get
17BUILDID="$1"17BUILDID="$1"
18ARCHITECTURETAG="$2"
18ROOT=$HOME/build-$BUILDID/chroot-autobuild19ROOT=$HOME/build-$BUILDID/chroot-autobuild
19OPTIONS="-o DPkg::Options::=--force-confold"20OPTIONS="-o DPkg::Options::=--force-confold"
2021
@@ -25,18 +26,13 @@
25echo "Updating debian chroot for build $BUILDID"26echo "Updating debian chroot for build $BUILDID"
2627
27hostarch=$(dpkg --print-architecture)28hostarch=$(dpkg --print-architecture)
28architecturetag=$hostarch
29
30if [ -f /etc/launchpad-buildd/default ]; then
31 eval `grep architecturetag /etc/launchpad-buildd/default | sed 's/ //g'`
32fi
3329
34case $hostarch in30case $hostarch in
35 hppa|powerpc|sparc)31 hppa|powerpc|sparc)
36 CHROOT="linux32 $CHROOT"32 CHROOT="linux32 $CHROOT"
37 ;;33 ;;
38 amd64)34 amd64)
39 if [ "$hostarch" != "$architecturetag" ]; then35 if [ "$hostarch" != "$ARCHITECTURETAG" ]; then
40 CHROOT="linux32 $CHROOT"36 CHROOT="linux32 $CHROOT"
41 fi37 fi
42 ;;38 ;;
4339
=== modified file 'lib/lp/buildmaster/doc/builder.txt'
--- lib/lp/buildmaster/doc/builder.txt 2010-08-03 17:48:22 +0000
+++ lib/lp/buildmaster/doc/builder.txt 2010-08-05 21:16:05 +0000
@@ -261,40 +261,6 @@
261 >>> config_data = config.pop('vm_resume_command')261 >>> config_data = config.pop('vm_resume_command')
262262
263263
264Slave architecture checks
265=========================
266
267Builder.checkSlaveArchitecture() asks the slave for its version and tries
268to match it against a DistroArchSeries with a ProcessorFamily containing
269the Builder's Processor. If it fails, it will raise an exception so the
270builder can be marked as failed.
271
272A fictitious i386 variant is rejected, since there are no DASes with that
273tag.
274
275 >>> from lp.soyuz.tests.soyuzbuilddhelpers import OkSlave
276 >>> bob.setSlaveForTesting(OkSlave('i387'))
277 >>> bob.checkSlaveArchitecture()
278 Traceback (most recent call last):
279 ...
280 BuildDaemonError: Bad slave architecture tag: i387 (registered family: x86)
281
282hppa isn't in the x86 family, so it too is rejected.
283
284 >>> from lp.soyuz.tests.soyuzbuilddhelpers import OkSlave
285 >>> bob.setSlaveForTesting(OkSlave('hppa'))
286 >>> bob.checkSlaveArchitecture()
287 Traceback (most recent call last):
288 ...
289 BuildDaemonError: Bad slave architecture tag: hppa (registered family: x86)
290
291But i386, a real x86 variant, passes without objection.
292
293 >>> from lp.soyuz.tests.soyuzbuilddhelpers import OkSlave
294 >>> bob.setSlaveForTesting(OkSlave('i386'))
295 >>> bob.checkSlaveArchitecture()
296
297
298Rescuing lost slaves264Rescuing lost slaves
299====================265====================
300266
301267
=== modified file 'lib/lp/buildmaster/interfaces/builder.py'
--- lib/lp/buildmaster/interfaces/builder.py 2010-06-04 14:50:46 +0000
+++ lib/lp/buildmaster/interfaces/builder.py 2010-08-05 21:16:05 +0000
@@ -150,20 +150,6 @@
150 title=u"The current behavior of the builder for the current job.",150 title=u"The current behavior of the builder for the current job.",
151 required=False)151 required=False)
152152
153 def checkSlaveArchitecture():
154 """Check that the slave can compile for its nominated processor.
155
156 This will query the builder to determine its actual architecture (as
157 opposed to what we expect it to be). It will then look for a
158 DistroArchSeries with the returned architecture tag, and confirm that
159 the processor type matches.
160
161 :raises BuildDaemonError: When the builder is down or of the wrong
162 architecture.
163 :raises ProtocolVersionMismatch: When the builder returns an
164 unsupported protocol version.
165 """
166
167 def checkSlaveAlive():153 def checkSlaveAlive():
168 """Check that the buildd slave is alive.154 """Check that the buildd slave is alive.
169155
170156
=== modified file 'lib/lp/buildmaster/model/builder.py'
--- lib/lp/buildmaster/model/builder.py 2010-08-03 14:48:22 +0000
+++ lib/lp/buildmaster/model/builder.py 2010-08-05 21:16:05 +0000
@@ -25,7 +25,6 @@
25from sqlobject import (25from sqlobject import (
26 BoolCol, ForeignKey, IntCol, SQLObjectNotFound, StringCol)26 BoolCol, ForeignKey, IntCol, SQLObjectNotFound, StringCol)
27from storm.expr import Coalesce, Count, Sum27from storm.expr import Coalesce, Count, Sum
28from storm.store import Store
29from zope.component import getUtility28from zope.component import getUtility
30from zope.interface import implements29from zope.interface import implements
3130
@@ -42,8 +41,7 @@
42from lp.app.errors import NotFoundError41from lp.app.errors import NotFoundError
43from lp.buildmaster.interfaces.builder import (42from lp.buildmaster.interfaces.builder import (
44 BuildDaemonError, BuildSlaveFailure, CannotBuild, CannotFetchFile,43 BuildDaemonError, BuildSlaveFailure, CannotBuild, CannotFetchFile,
45 CannotResumeHost, CorruptBuildCookie, IBuilder, IBuilderSet,44 CannotResumeHost, CorruptBuildCookie, IBuilder, IBuilderSet)
46 ProtocolVersionMismatch)
47from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJobSet45from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJobSet
48from lp.buildmaster.interfaces.buildfarmjobbehavior import (46from lp.buildmaster.interfaces.buildfarmjobbehavior import (
49 BuildBehaviorMismatch)47 BuildBehaviorMismatch)
@@ -204,7 +202,6 @@
204202
205 try:203 try:
206 builder.checkSlaveAlive()204 builder.checkSlaveAlive()
207 builder.checkSlaveArchitecture()
208 builder.rescueIfLost(logger)205 builder.rescueIfLost(logger)
209 # Catch only known exceptions.206 # Catch only known exceptions.
210 # XXX cprov 2007-06-15 bug=120571: ValueError & TypeError catching is207 # XXX cprov 2007-06-15 bug=120571: ValueError & TypeError catching is
@@ -284,38 +281,6 @@
284 current_build_behavior = property(281 current_build_behavior = property(
285 _getCurrentBuildBehavior, _setCurrentBuildBehavior)282 _getCurrentBuildBehavior, _setCurrentBuildBehavior)
286283
287 def checkSlaveArchitecture(self):
288 """See `IBuilder`."""
289 # XXX cprov 2007-06-15 bug=545839:
290 # This function currently depends on the operating system specific
291 # details of the build slave to return a processor-family-name (the
292 # architecturetag) which matches the distro_arch_series. In reality,
293 # we should be checking the processor itself (e.g. amd64) as that is
294 # what the distro policy is set from, the architecture tag is both
295 # distro specific and potentially different for radically different
296 # distributions - its not the right thing to be comparing.
297
298 from lp.soyuz.model.distroarchseries import DistroArchSeries
299
300 # query the slave for its active details.
301 # XXX cprov 2007-06-15: Why is 'mechanisms' ignored?
302 builder_vers, builder_arch, mechanisms = self.slave.info()
303 # we can only understand one version of slave today:
304 if builder_vers != '1.0':
305 raise ProtocolVersionMismatch("Protocol version mismatch")
306
307 # Find a distroarchseries with the returned arch tag.
308 # This is ugly, sick and wrong, but so is the whole concept. See the
309 # XXX above and its bug for details.
310 das = Store.of(self).find(
311 DistroArchSeries, architecturetag=builder_arch,
312 processorfamily=self.processor.family).any()
313
314 if das is None:
315 raise BuildDaemonError(
316 "Bad slave architecture tag: %s (registered family: %s)" %
317 (builder_arch, self.processor.family.name))
318
319 def checkSlaveAlive(self):284 def checkSlaveAlive(self):
320 """See IBuilder."""285 """See IBuilder."""
321 if self.slave.echo("Test")[0] != "Test":286 if self.slave.echo("Test")[0] != "Test":
322287
=== modified file 'lib/lp/buildmaster/tests/test_manager.py'
--- lib/lp/buildmaster/tests/test_manager.py 2010-07-28 09:56:24 +0000
+++ lib/lp/buildmaster/tests/test_manager.py 2010-08-05 21:16:05 +0000
@@ -644,6 +644,7 @@
644 {'alsa-utils_1.0.9a-4ubuntu1.dsc':644 {'alsa-utils_1.0.9a-4ubuntu1.dsc':
645 '4e3961baf4f56fdbc95d0dd47f3c5bc275da8a33'},645 '4e3961baf4f56fdbc95d0dd47f3c5bc275da8a33'},
646 {'arch_indep': True,646 {'arch_indep': True,
647 'arch_tag': 'i386',
647 'archive_private': False,648 'archive_private': False,
648 'archive_purpose': 'PRIMARY',649 'archive_purpose': 'PRIMARY',
649 'archives':650 'archives':
650651
=== modified file 'lib/lp/code/model/recipebuilder.py'
--- lib/lp/code/model/recipebuilder.py 2010-05-27 17:55:16 +0000
+++ lib/lp/code/model/recipebuilder.py 2010-08-05 21:16:05 +0000
@@ -62,6 +62,7 @@
62 if self.build.pocket != PackagePublishingPocket.RELEASE:62 if self.build.pocket != PackagePublishingPocket.RELEASE:
63 suite += "-%s" % (self.build.pocket.name.lower())63 suite += "-%s" % (self.build.pocket.name.lower())
64 args['suite'] = suite64 args['suite'] = suite
65 args['arch_tag'] = distroarchseries.architecturetag
65 args["author_name"] = self.build.requester.displayname66 args["author_name"] = self.build.requester.displayname
66 args["author_email"] = self.build.requester.preferredemail.email67 args["author_email"] = self.build.requester.preferredemail.email
67 args["recipe_text"] = str(self.build.recipe.builder_recipe)68 args["recipe_text"] = str(self.build.recipe.builder_recipe)
6869
=== modified file 'lib/lp/code/model/tests/test_recipebuilder.py'
--- lib/lp/code/model/tests/test_recipebuilder.py 2010-06-11 04:45:18 +0000
+++ lib/lp/code/model/tests/test_recipebuilder.py 2010-08-05 21:16:05 +0000
@@ -140,6 +140,7 @@
140 expected_archives.append(140 expected_archives.append(
141 "deb http://foo %s main" % job.build.distroseries.name)141 "deb http://foo %s main" % job.build.distroseries.name)
142 self.assertEqual({142 self.assertEqual({
143 'arch_tag': 'i386',
143 'author_email': u'requester@ubuntu.com',144 'author_email': u'requester@ubuntu.com',
144 'suite': u'mydistro',145 'suite': u'mydistro',
145 'author_name': u'Joe User',146 'author_name': u'Joe User',
@@ -169,6 +170,7 @@
169 job.build, distroarchseries, None)170 job.build, distroarchseries, None)
170 logger = BufferLogger()171 logger = BufferLogger()
171 self.assertEqual({172 self.assertEqual({
173 'arch_tag': 'i386',
172 'author_email': u'requester@ubuntu.com',174 'author_email': u'requester@ubuntu.com',
173 'suite': u'mydistro',175 'suite': u'mydistro',
174 'author_name': u'Joe User',176 'author_name': u'Joe User',
175177
=== modified file 'lib/lp/soyuz/model/binarypackagebuildbehavior.py'
--- lib/lp/soyuz/model/binarypackagebuildbehavior.py 2010-05-20 13:24:01 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehavior.py 2010-08-05 21:16:05 +0000
@@ -192,6 +192,8 @@
192 suite += "-%s" % (build.pocket.name.lower())192 suite += "-%s" % (build.pocket.name.lower())
193 args['suite'] = suite193 args['suite'] = suite
194194
195 args['arch_tag'] = build.distro_arch_series.architecturetag
196
195 archive_purpose = build.archive.purpose197 archive_purpose = build.archive.purpose
196 if (archive_purpose == ArchivePurpose.PPA and198 if (archive_purpose == ArchivePurpose.PPA and
197 not build.archive.require_virtualized):199 not build.archive.require_virtualized):
198200
=== modified file 'lib/lp/soyuz/tests/soyuzbuilddhelpers.py'
--- lib/lp/soyuz/tests/soyuzbuilddhelpers.py 2010-07-31 23:10:08 +0000
+++ lib/lp/soyuz/tests/soyuzbuilddhelpers.py 2010-08-05 21:16:05 +0000
@@ -71,9 +71,6 @@
71 def checkSlaveAlive(self):71 def checkSlaveAlive(self):
72 pass72 pass
7373
74 def checkSlaveArchitecture(self):
75 pass
76
77 def rescueIfLost(self, logger=None):74 def rescueIfLost(self, logger=None):
78 rescueBuilderIfLost(self, logger)75 rescueBuilderIfLost(self, logger)
7976
8077
=== modified file 'lib/lp/translations/model/translationtemplatesbuildbehavior.py'
--- lib/lp/translations/model/translationtemplatesbuildbehavior.py 2010-05-24 10:14:41 +0000
+++ lib/lp/translations/model/translationtemplatesbuildbehavior.py 2010-08-05 21:16:05 +0000
@@ -44,15 +44,20 @@
44 self._builder.slave.cacheFile(logger, chroot)44 self._builder.slave.cacheFile(logger, chroot)
45 cookie = self.buildfarmjob.generateSlaveBuildCookie()45 cookie = self.buildfarmjob.generateSlaveBuildCookie()
4646
47 args = self.buildfarmjob.metadata47 args = {'arch_tag': self._getDistroArchSeries().architecturetag}
48 args.update(self.buildfarmjob.metadata)
49
48 filemap = {}50 filemap = {}
4951
50 self._builder.slave.build(52 self._builder.slave.build(
51 cookie, self.build_type, chroot_sha1, filemap, args)53 cookie, self.build_type, chroot_sha1, filemap, args)
5254
53 def _getChroot(self):55 def _getChroot(self):
56 return self._getDistroArchSeries().getChroot()
57
58 def _getDistroArchSeries(self):
54 ubuntu = getUtility(ILaunchpadCelebrities).ubuntu59 ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
55 return ubuntu.currentseries.nominatedarchindep.getChroot()60 return ubuntu.currentseries.nominatedarchindep
5661
57 def logStartBuild(self, logger):62 def logStartBuild(self, logger):
58 """See `IBuildFarmJobBehavior`."""63 """See `IBuildFarmJobBehavior`."""