Merge lp:~wgrant/launchpad/no-buildd-ogre-model into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 11014
Proposed branch: lp:~wgrant/launchpad/no-buildd-ogre-model
Merge into: lp:launchpad
Diff against target: 245 lines (+28/-100)
8 files modified
lib/canonical/buildd/apply-ogre-model (+0/-39)
lib/canonical/buildd/binarypackage.py (+7/-17)
lib/canonical/buildd/debian.py (+1/-40)
lib/canonical/buildd/debian/changelog (+7/-0)
lib/canonical/buildd/debian/rules (+2/-2)
lib/canonical/buildd/debian/upgrade-config (+11/-0)
lib/canonical/buildd/template-buildd-slave.conf (+0/-1)
lib/canonical/buildd/tests/buildd-slave-test.conf (+0/-1)
To merge this branch: bzr merge lp:~wgrant/launchpad/no-buildd-ogre-model
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+27410@code.launchpad.net

Commit message

Remove obsolete slave-side ogre model support from launchpad-buildd.

Description of the change

This branch removes ogre model support from launchpad-buildd. The 'ogre model' refers to the layered layout of Ubuntu's components -- main can only depend on main, universe can depend on universe and main, etc.

apply-ogre-model used to look at the component name provided by the master, and from that decide which pre-built sources.list to use. But since the advent of PPAs, the master sends a list of sources.list entries, which is used by override-sources-list to clobber the slave-picked one.

Current chroots don't even have the pre-built sources.lists to select from any more, so apply-ogre-model does nothing and has been vestigial for three years. It's high time that it was removed.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'lib/canonical/buildd/apply-ogre-model'
--- lib/canonical/buildd/apply-ogre-model 2009-06-30 21:06:27 +0000
+++ lib/canonical/buildd/apply-ogre-model 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
1#!/bin/sh
2#
3# Copyright 2009 Canonical Ltd. This software is licensed under the
4# GNU Affero General Public License version 3 (see the file LICENSE).
5#
6# Author: Daniel Silverstone <daniel.silverstone@canonical.com>
7
8# Buildd Slave tool to apply the ogre model to the chroot
9
10# Expects build id as arg 1, makes build-id to contain the build
11# Expects ogre component name as arg 2
12
13# Needs SUDO to be set to a sudo instance for passwordless access
14# LN must be an ln instance which can take -s and -f at the same time
15
16SUDO=/usr/bin/sudo
17
18BUILDID="$1"
19COMPONENT="$2"
20
21set -e
22
23exec 2>&1
24
25cd $HOME
26cd "build-$BUILDID/chroot-autobuild/etc/apt"
27
28echo "Attempting OGRE for $COMPONENT in build-$BUILDID"
29
30if [ -e "sources.list.$COMPONENT" ]; then
31 if [ -h "sources.list" ]; then
32 $SUDO ln -sf "sources.list.$COMPONENT" sources.list
33 else
34 echo "OGRE sources.list found, but sources.list is not a symlink"
35 fi
36else
37 echo "No OGRE sources.list found."
38fi
39
400
=== modified file 'lib/canonical/buildd/binarypackage.py'
--- lib/canonical/buildd/binarypackage.py 2010-01-14 02:55:22 +0000
+++ lib/canonical/buildd/binarypackage.py 2010-06-12 05:15:45 +0000
@@ -55,22 +55,12 @@
55 self._dscfile = f55 self._dscfile = f
56 if self._dscfile is None:56 if self._dscfile is None:
57 raise ValueError, files57 raise ValueError, files
58 if 'arch_indep' in extra_args:58
59 self.arch_indep = extra_args['arch_indep']59 self.archive_purpose = extra_args.get('archive_purpose')
60 else:60 self.suite = extra_args.get('suite')
61 self.arch_indep = False61 self.component = extra_args['ogrecomponent']
62 if 'suite' in extra_args:62 self.arch_indep = extra_args.get('arch_indep', False)
63 self.suite = extra_args['suite']63 self.build_debug_symbols = extra_args.get('build_debug_symbols', False)
64 else:
65 self.suite = False
66 if 'archive_purpose' in extra_args:
67 self.archive_purpose = extra_args['archive_purpose']
68 else:
69 self.archive_purpose = False
70 if 'build_debug_symbols' in extra_args:
71 self.build_debug_symbols = extra_args['build_debug_symbols']
72 else:
73 self.build_debug_symbols = False
7464
75 super(BinaryPackageBuildManager, self).initiate(65 super(BinaryPackageBuildManager, self).initiate(
76 files, chroot, extra_args)66 files, chroot, extra_args)
@@ -92,7 +82,7 @@
92 args.extend(["--purpose=" + self.archive_purpose])82 args.extend(["--purpose=" + self.archive_purpose])
93 if self.build_debug_symbols:83 if self.build_debug_symbols:
94 args.extend(["--build-debug-symbols"])84 args.extend(["--build-debug-symbols"])
95 args.extend(["--comp=" + self.ogre])85 args.extend(["--comp=" + self.component])
96 args.extend([self._dscfile])86 args.extend([self._dscfile])
97 self.runSubProcess( self._sbuildpath, args )87 self.runSubProcess( self._sbuildpath, args )
9888
9989
=== modified file 'lib/canonical/buildd/debian.py'
--- lib/canonical/buildd/debian.py 2010-01-14 20:19:27 +0000
+++ lib/canonical/buildd/debian.py 2010-06-12 05:15:45 +0000
@@ -20,7 +20,6 @@
20 INIT = "INIT"20 INIT = "INIT"
21 UNPACK = "UNPACK"21 UNPACK = "UNPACK"
22 MOUNT = "MOUNT"22 MOUNT = "MOUNT"
23 OGRE = "OGRE"
24 SOURCES = "SOURCES"23 SOURCES = "SOURCES"
25 UPDATE = "UPDATE"24 UPDATE = "UPDATE"
26 REAP = "REAP"25 REAP = "REAP"
@@ -35,7 +34,6 @@
35 BuildManager.__init__(self, slave, buildid)34 BuildManager.__init__(self, slave, buildid)
36 self._updatepath = slave._config.get("debianmanager", "updatepath")35 self._updatepath = slave._config.get("debianmanager", "updatepath")
37 self._scanpath = slave._config.get("debianmanager", "processscanpath")36 self._scanpath = slave._config.get("debianmanager", "processscanpath")
38 self._ogrepath = slave._config.get("debianmanager", "ogrepath")
39 self._sourcespath = slave._config.get("debianmanager", "sourcespath")37 self._sourcespath = slave._config.get("debianmanager", "sourcespath")
40 self._cachepath = slave._config.get("slave","filecache")38 self._cachepath = slave._config.get("slave","filecache")
41 self._state = DebianBuildState.INIT39 self._state = DebianBuildState.INIT
@@ -49,32 +47,15 @@
49 def initiate(self, files, chroot, extra_args):47 def initiate(self, files, chroot, extra_args):
50 """Initiate a build with a given set of files and chroot."""48 """Initiate a build with a given set of files and chroot."""
5149
52 if 'ogrecomponent' in extra_args:50 self.sources_list = extra_args.get('archives')
53 # Ubuntu refers to the concept that "main sees only main
54 # while building" etc as "The Ogre Model" (onions, layers
55 # and all). If we're given an ogre component, use it
56 self.ogre = extra_args['ogrecomponent']
57 else:
58 self.ogre = False
59 if 'archives' in extra_args and extra_args['archives']:
60 self.sources_list = extra_args['archives']
61 else:
62 self.sources_list = None
6351
64 BuildManager.initiate(self, files, chroot, extra_args)52 BuildManager.initiate(self, files, chroot, extra_args)
6553
66 def doOgreModel(self):
67 """Perform the ogre model activation."""
68 self.runSubProcess(self._ogrepath,
69 ["apply-ogre-model", self._buildid, self.ogre])
70
71 def doSourcesList(self):54 def doSourcesList(self):
72 """Override apt/sources.list.55 """Override apt/sources.list.
7356
74 Mainly used for PPA builds.57 Mainly used for PPA builds.
75 """58 """
76 # XXX cprov 2007-05-17: It 'undo' ogre-component changes.
77 # for PPAs it must be re-implemented on builddmaster side.
78 args = ["override-sources-list", self._buildid]59 args = ["override-sources-list", self._buildid]
79 args.extend(self.sources_list)60 args.extend(self.sources_list)
80 self.runSubProcess(self._sourcespath, args)61 self.runSubProcess(self._sourcespath, args)
@@ -181,26 +162,6 @@
181 self._state = DebianBuildState.UMOUNT162 self._state = DebianBuildState.UMOUNT
182 self.doUnmounting()163 self.doUnmounting()
183 else:164 else:
184 # Run OGRE if we need to, else run UPDATE
185 if self.ogre:
186 self._state = DebianBuildState.OGRE
187 self.doOgreModel()
188 elif self.sources_list is not None:
189 self._state = DebianBuildState.SOURCES
190 self.doSourcesList()
191 else:
192 self._state = DebianBuildState.UPDATE
193 self.doUpdateChroot()
194
195 def iterate_OGRE(self, success):
196 """Just finished running the ogre applicator."""
197 if success != 0:
198 if not self.alreadyfailed:
199 self._slave.chrootFail()
200 self.alreadyfailed = True
201 self._state = DebianBuildState.REAP
202 self.doReapProcesses()
203 else:
204 if self.sources_list is not None:165 if self.sources_list is not None:
205 self._state = DebianBuildState.SOURCES166 self._state = DebianBuildState.SOURCES
206 self.doSourcesList()167 self.doSourcesList()
207168
=== modified file 'lib/canonical/buildd/debian/changelog'
--- lib/canonical/buildd/debian/changelog 2010-06-10 16:52:04 +0000
+++ lib/canonical/buildd/debian/changelog 2010-06-12 05:15:45 +0000
@@ -1,3 +1,10 @@
1launchpad-buildd (63) hardy-cat; urgency=low
2
3 * Drop apply-ogre-model, since override-sources-list replaced it three years
4 ago. Also clean up extra_args parsing a bit.
5
6 -- William Grant <wgrant@ubuntu.com> Sat, 12 Jun 2010 11:33:11 +1000
7
1launchpad-buildd (62) hardy-cat; urgency=low8launchpad-buildd (62) hardy-cat; urgency=low
29
3 * Make the buildds cope with not having a sourcepackagename LP#587109 10 * Make the buildds cope with not having a sourcepackagename LP#587109
411
=== modified file 'lib/canonical/buildd/debian/rules'
--- lib/canonical/buildd/debian/rules 2010-03-10 21:23:17 +0000
+++ lib/canonical/buildd/debian/rules 2010-06-12 05:15:45 +0000
@@ -24,8 +24,8 @@
24pyfiles = debian.py slave.py binarypackage.py utils.py __init__.py \24pyfiles = debian.py slave.py binarypackage.py utils.py __init__.py \
25 sourcepackagerecipe.py translationtemplates.py25 sourcepackagerecipe.py translationtemplates.py
26slavebins = unpack-chroot mount-chroot update-debian-chroot sbuild-package \26slavebins = unpack-chroot mount-chroot update-debian-chroot sbuild-package \
27scan-for-processes umount-chroot remove-build apply-ogre-model \27 scan-for-processes umount-chroot remove-build override-sources-list \
28override-sources-list buildrecipe generate-translation-templates28 buildrecipe generate-translation-templates
2929
30BUILDDUID=6550030BUILDDUID=65500
31BUILDDGID=6550031BUILDDGID=65500
3232
=== modified file 'lib/canonical/buildd/debian/upgrade-config'
--- lib/canonical/buildd/debian/upgrade-config 2010-04-01 03:47:51 +0000
+++ lib/canonical/buildd/debian/upgrade-config 2010-06-12 05:15:45 +0000
@@ -92,6 +92,15 @@
92 'generatepath = /usr/share/launchpad-buildd/slavebin/generate-translation-templates\n'92 'generatepath = /usr/share/launchpad-buildd/slavebin/generate-translation-templates\n'
93 'resultarchive = translation-templates.tar.gz\n')93 'resultarchive = translation-templates.tar.gz\n')
9494
95def upgrade_to_63():
96 print "Upgrading %s to version 63" % conf_file
97 subprocess.call(["mv", conf_file, conf_file+"-prev63~"])
98 in_file = open(conf_file+"-prev63~", "r")
99 out_file = open(conf_file, "w")
100 for line in in_file:
101 if not line.startswith('ogrepath'):
102 out_file.write(line)
103
95104
96if __name__ == "__main__":105if __name__ == "__main__":
97 if old_version.find("~") > 0:106 if old_version.find("~") > 0:
@@ -108,4 +117,6 @@
108 upgrade_to_58()117 upgrade_to_58()
109 if int(old_version) < 59:118 if int(old_version) < 59:
110 upgrade_to_59()119 upgrade_to_59()
120 if int(old_version) < 63:
121 upgrade_to_63()
111122
112123
=== modified file 'lib/canonical/buildd/template-buildd-slave.conf'
--- lib/canonical/buildd/template-buildd-slave.conf 2010-03-12 08:32:39 +0000
+++ lib/canonical/buildd/template-buildd-slave.conf 2010-06-12 05:15:45 +0000
@@ -18,7 +18,6 @@
18[debianmanager]18[debianmanager]
19updatepath = /usr/share/launchpad-buildd/slavebin/update-debian-chroot19updatepath = /usr/share/launchpad-buildd/slavebin/update-debian-chroot
20processscanpath = /usr/share/launchpad-buildd/slavebin/scan-for-processes20processscanpath = /usr/share/launchpad-buildd/slavebin/scan-for-processes
21ogrepath = /usr/share/launchpad-buildd/slavebin/apply-ogre-model
22sourcespath = /usr/share/launchpad-buildd/slavebin/override-sources-list21sourcespath = /usr/share/launchpad-buildd/slavebin/override-sources-list
2322
24[binarypackagemanager]23[binarypackagemanager]
2524
=== modified file 'lib/canonical/buildd/tests/buildd-slave-test.conf'
--- lib/canonical/buildd/tests/buildd-slave-test.conf 2007-06-05 00:53:06 +0000
+++ lib/canonical/buildd/tests/buildd-slave-test.conf 2010-06-12 05:15:45 +0000
@@ -17,5 +17,4 @@
17sbuildargs = -dautobuild --nolog --batch17sbuildargs = -dautobuild --nolog --batch
18updatepath = /var/tmp/buildd/slavebin/update-debian-chroot18updatepath = /var/tmp/buildd/slavebin/update-debian-chroot
19processscanpath = /var/tmp/buildd/slavebin/scan-for-processes19processscanpath = /var/tmp/buildd/slavebin/scan-for-processes
20ogrepath = /var/tmp/buildd/slavebin/apply-ogre-model
21sourcespath = /usr/share/launchpad-buildd/slavebin/override-sources-list20sourcespath = /usr/share/launchpad-buildd/slavebin/override-sources-list