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
1=== removed file 'lib/canonical/buildd/apply-ogre-model'
2--- lib/canonical/buildd/apply-ogre-model 2009-06-30 21:06:27 +0000
3+++ lib/canonical/buildd/apply-ogre-model 1970-01-01 00:00:00 +0000
4@@ -1,39 +0,0 @@
5-#!/bin/sh
6-#
7-# Copyright 2009 Canonical Ltd. This software is licensed under the
8-# GNU Affero General Public License version 3 (see the file LICENSE).
9-#
10-# Author: Daniel Silverstone <daniel.silverstone@canonical.com>
11-
12-# Buildd Slave tool to apply the ogre model to the chroot
13-
14-# Expects build id as arg 1, makes build-id to contain the build
15-# Expects ogre component name as arg 2
16-
17-# Needs SUDO to be set to a sudo instance for passwordless access
18-# LN must be an ln instance which can take -s and -f at the same time
19-
20-SUDO=/usr/bin/sudo
21-
22-BUILDID="$1"
23-COMPONENT="$2"
24-
25-set -e
26-
27-exec 2>&1
28-
29-cd $HOME
30-cd "build-$BUILDID/chroot-autobuild/etc/apt"
31-
32-echo "Attempting OGRE for $COMPONENT in build-$BUILDID"
33-
34-if [ -e "sources.list.$COMPONENT" ]; then
35- if [ -h "sources.list" ]; then
36- $SUDO ln -sf "sources.list.$COMPONENT" sources.list
37- else
38- echo "OGRE sources.list found, but sources.list is not a symlink"
39- fi
40-else
41- echo "No OGRE sources.list found."
42-fi
43-
44
45=== modified file 'lib/canonical/buildd/binarypackage.py'
46--- lib/canonical/buildd/binarypackage.py 2010-01-14 02:55:22 +0000
47+++ lib/canonical/buildd/binarypackage.py 2010-06-12 05:15:45 +0000
48@@ -55,22 +55,12 @@
49 self._dscfile = f
50 if self._dscfile is None:
51 raise ValueError, files
52- if 'arch_indep' in extra_args:
53- self.arch_indep = extra_args['arch_indep']
54- else:
55- self.arch_indep = False
56- if 'suite' in extra_args:
57- self.suite = extra_args['suite']
58- else:
59- self.suite = False
60- if 'archive_purpose' in extra_args:
61- self.archive_purpose = extra_args['archive_purpose']
62- else:
63- self.archive_purpose = False
64- if 'build_debug_symbols' in extra_args:
65- self.build_debug_symbols = extra_args['build_debug_symbols']
66- else:
67- self.build_debug_symbols = False
68+
69+ self.archive_purpose = extra_args.get('archive_purpose')
70+ self.suite = extra_args.get('suite')
71+ self.component = extra_args['ogrecomponent']
72+ self.arch_indep = extra_args.get('arch_indep', False)
73+ self.build_debug_symbols = extra_args.get('build_debug_symbols', False)
74
75 super(BinaryPackageBuildManager, self).initiate(
76 files, chroot, extra_args)
77@@ -92,7 +82,7 @@
78 args.extend(["--purpose=" + self.archive_purpose])
79 if self.build_debug_symbols:
80 args.extend(["--build-debug-symbols"])
81- args.extend(["--comp=" + self.ogre])
82+ args.extend(["--comp=" + self.component])
83 args.extend([self._dscfile])
84 self.runSubProcess( self._sbuildpath, args )
85
86
87=== modified file 'lib/canonical/buildd/debian.py'
88--- lib/canonical/buildd/debian.py 2010-01-14 20:19:27 +0000
89+++ lib/canonical/buildd/debian.py 2010-06-12 05:15:45 +0000
90@@ -20,7 +20,6 @@
91 INIT = "INIT"
92 UNPACK = "UNPACK"
93 MOUNT = "MOUNT"
94- OGRE = "OGRE"
95 SOURCES = "SOURCES"
96 UPDATE = "UPDATE"
97 REAP = "REAP"
98@@ -35,7 +34,6 @@
99 BuildManager.__init__(self, slave, buildid)
100 self._updatepath = slave._config.get("debianmanager", "updatepath")
101 self._scanpath = slave._config.get("debianmanager", "processscanpath")
102- self._ogrepath = slave._config.get("debianmanager", "ogrepath")
103 self._sourcespath = slave._config.get("debianmanager", "sourcespath")
104 self._cachepath = slave._config.get("slave","filecache")
105 self._state = DebianBuildState.INIT
106@@ -49,32 +47,15 @@
107 def initiate(self, files, chroot, extra_args):
108 """Initiate a build with a given set of files and chroot."""
109
110- if 'ogrecomponent' in extra_args:
111- # Ubuntu refers to the concept that "main sees only main
112- # while building" etc as "The Ogre Model" (onions, layers
113- # and all). If we're given an ogre component, use it
114- self.ogre = extra_args['ogrecomponent']
115- else:
116- self.ogre = False
117- if 'archives' in extra_args and extra_args['archives']:
118- self.sources_list = extra_args['archives']
119- else:
120- self.sources_list = None
121+ self.sources_list = extra_args.get('archives')
122
123 BuildManager.initiate(self, files, chroot, extra_args)
124
125- def doOgreModel(self):
126- """Perform the ogre model activation."""
127- self.runSubProcess(self._ogrepath,
128- ["apply-ogre-model", self._buildid, self.ogre])
129-
130 def doSourcesList(self):
131 """Override apt/sources.list.
132
133 Mainly used for PPA builds.
134 """
135- # XXX cprov 2007-05-17: It 'undo' ogre-component changes.
136- # for PPAs it must be re-implemented on builddmaster side.
137 args = ["override-sources-list", self._buildid]
138 args.extend(self.sources_list)
139 self.runSubProcess(self._sourcespath, args)
140@@ -181,26 +162,6 @@
141 self._state = DebianBuildState.UMOUNT
142 self.doUnmounting()
143 else:
144- # Run OGRE if we need to, else run UPDATE
145- if self.ogre:
146- self._state = DebianBuildState.OGRE
147- self.doOgreModel()
148- elif self.sources_list is not None:
149- self._state = DebianBuildState.SOURCES
150- self.doSourcesList()
151- else:
152- self._state = DebianBuildState.UPDATE
153- self.doUpdateChroot()
154-
155- def iterate_OGRE(self, success):
156- """Just finished running the ogre applicator."""
157- if success != 0:
158- if not self.alreadyfailed:
159- self._slave.chrootFail()
160- self.alreadyfailed = True
161- self._state = DebianBuildState.REAP
162- self.doReapProcesses()
163- else:
164 if self.sources_list is not None:
165 self._state = DebianBuildState.SOURCES
166 self.doSourcesList()
167
168=== modified file 'lib/canonical/buildd/debian/changelog'
169--- lib/canonical/buildd/debian/changelog 2010-06-10 16:52:04 +0000
170+++ lib/canonical/buildd/debian/changelog 2010-06-12 05:15:45 +0000
171@@ -1,3 +1,10 @@
172+launchpad-buildd (63) hardy-cat; urgency=low
173+
174+ * Drop apply-ogre-model, since override-sources-list replaced it three years
175+ ago. Also clean up extra_args parsing a bit.
176+
177+ -- William Grant <wgrant@ubuntu.com> Sat, 12 Jun 2010 11:33:11 +1000
178+
179 launchpad-buildd (62) hardy-cat; urgency=low
180
181 * Make the buildds cope with not having a sourcepackagename LP#587109
182
183=== modified file 'lib/canonical/buildd/debian/rules'
184--- lib/canonical/buildd/debian/rules 2010-03-10 21:23:17 +0000
185+++ lib/canonical/buildd/debian/rules 2010-06-12 05:15:45 +0000
186@@ -24,8 +24,8 @@
187 pyfiles = debian.py slave.py binarypackage.py utils.py __init__.py \
188 sourcepackagerecipe.py translationtemplates.py
189 slavebins = unpack-chroot mount-chroot update-debian-chroot sbuild-package \
190-scan-for-processes umount-chroot remove-build apply-ogre-model \
191-override-sources-list buildrecipe generate-translation-templates
192+ scan-for-processes umount-chroot remove-build override-sources-list \
193+ buildrecipe generate-translation-templates
194
195 BUILDDUID=65500
196 BUILDDGID=65500
197
198=== modified file 'lib/canonical/buildd/debian/upgrade-config'
199--- lib/canonical/buildd/debian/upgrade-config 2010-04-01 03:47:51 +0000
200+++ lib/canonical/buildd/debian/upgrade-config 2010-06-12 05:15:45 +0000
201@@ -92,6 +92,15 @@
202 'generatepath = /usr/share/launchpad-buildd/slavebin/generate-translation-templates\n'
203 'resultarchive = translation-templates.tar.gz\n')
204
205+def upgrade_to_63():
206+ print "Upgrading %s to version 63" % conf_file
207+ subprocess.call(["mv", conf_file, conf_file+"-prev63~"])
208+ in_file = open(conf_file+"-prev63~", "r")
209+ out_file = open(conf_file, "w")
210+ for line in in_file:
211+ if not line.startswith('ogrepath'):
212+ out_file.write(line)
213+
214
215 if __name__ == "__main__":
216 if old_version.find("~") > 0:
217@@ -108,4 +117,6 @@
218 upgrade_to_58()
219 if int(old_version) < 59:
220 upgrade_to_59()
221+ if int(old_version) < 63:
222+ upgrade_to_63()
223
224
225=== modified file 'lib/canonical/buildd/template-buildd-slave.conf'
226--- lib/canonical/buildd/template-buildd-slave.conf 2010-03-12 08:32:39 +0000
227+++ lib/canonical/buildd/template-buildd-slave.conf 2010-06-12 05:15:45 +0000
228@@ -18,7 +18,6 @@
229 [debianmanager]
230 updatepath = /usr/share/launchpad-buildd/slavebin/update-debian-chroot
231 processscanpath = /usr/share/launchpad-buildd/slavebin/scan-for-processes
232-ogrepath = /usr/share/launchpad-buildd/slavebin/apply-ogre-model
233 sourcespath = /usr/share/launchpad-buildd/slavebin/override-sources-list
234
235 [binarypackagemanager]
236
237=== modified file 'lib/canonical/buildd/tests/buildd-slave-test.conf'
238--- lib/canonical/buildd/tests/buildd-slave-test.conf 2007-06-05 00:53:06 +0000
239+++ lib/canonical/buildd/tests/buildd-slave-test.conf 2010-06-12 05:15:45 +0000
240@@ -17,5 +17,4 @@
241 sbuildargs = -dautobuild --nolog --batch
242 updatepath = /var/tmp/buildd/slavebin/update-debian-chroot
243 processscanpath = /var/tmp/buildd/slavebin/scan-for-processes
244-ogrepath = /var/tmp/buildd/slavebin/apply-ogre-model
245 sourcespath = /usr/share/launchpad-buildd/slavebin/override-sources-list