launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17230
[Merge] lp:~cjwatson/launchpad-buildd/unhardcode-distribution into lp:launchpad-buildd
Colin Watson has proposed merging lp:~cjwatson/launchpad-buildd/unhardcode-distribution into lp:launchpad-buildd.
Commit message:
If binarypackage gets a "distribution" argument, pass it to sbuild's --archive option (LP: #1348077).
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1348077 in launchpad-buildd: "buildd slave config hardcodes --archive=ubuntu"
https://bugs.launchpad.net/launchpad-buildd/+bug/1348077
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/unhardcode-distribution/+merge/228114
The other half of https://code.launchpad.net/~cjwatson/launchpad/bpbb-distribution/+merge/228093; if we get a "distribution" argument from the master for a binarypackage build, pass it to sbuild's (misnamed) --archive option. This will end up in the Distribution field in ddebs.txt, as well as in the no-longer-used translations.txt, removing ambiguity from the interface with ddeb-retriever.
--
https://code.launchpad.net/~cjwatson/launchpad-buildd/unhardcode-distribution/+merge/228114
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/unhardcode-distribution into lp:launchpad-buildd.
=== modified file 'debian/changelog'
--- debian/changelog 2014-07-24 11:44:04 +0000
+++ debian/changelog 2014-07-24 13:40:35 +0000
@@ -11,6 +11,11 @@
cover some more build systems (see https://bugs.debian.org/751528).
* Fix lpbuildd.livefs tests to account for the "suite" argument no longer
being accepted.
+ * Drop support for running binarypackage builds without a "suite"
+ argument; Launchpad has passed this for all binarypackage builds since
+ 2007.
+ * If binarypackage gets a "distribution" argument, pass it to sbuild's
+ --archive option (LP: #1348077).
[ Adam Conrad ]
* scan-for-processes: Don't explode if one of the processes we were
=== modified file 'lpbuildd/binarypackage.py'
--- lpbuildd/binarypackage.py 2013-10-04 01:05:00 +0000
+++ lpbuildd/binarypackage.py 2014-07-24 13:40:35 +0000
@@ -56,7 +56,8 @@
raise ValueError, files
self.archive_purpose = extra_args.get('archive_purpose')
- self.suite = extra_args.get('suite')
+ self.distribution = extra_args.get('distribution')
+ self.suite = extra_args['suite']
self.component = extra_args['ogrecomponent']
self.arch_indep = extra_args.get('arch_indep', False)
self.build_debug_symbols = extra_args.get('build_debug_symbols', False)
@@ -67,23 +68,20 @@
def doRunBuild(self):
"""Run the sbuild process to build the package."""
args = ["sbuild-package", self._buildid, self.arch_tag]
- if self.suite:
- args.extend([self.suite])
- args.extend(self._sbuildargs)
- args.extend(["--dist=" + self.suite])
- else:
- args.extend(['autobuild'])
- args.extend(self._sbuildargs)
- args.extend(["--dist=autobuild"])
+ args.append(self.suite)
+ args.extend(self._sbuildargs)
+ if self.distribution:
+ args.append("--archive=" + self.distribution)
+ args.append("--dist=" + self.suite)
if self.arch_indep:
- args.extend(["-A"])
+ args.append("-A")
if self.archive_purpose:
- args.extend(["--purpose=" + self.archive_purpose])
+ args.append("--purpose=" + self.archive_purpose)
if self.build_debug_symbols:
- args.extend(["--build-debug-symbols"])
- args.extend(["--architecture=" + self.arch_tag])
- args.extend(["--comp=" + self.component])
- args.extend([self._dscfile])
+ args.append("--build-debug-symbols")
+ args.append("--architecture=" + self.arch_tag)
+ args.append("--comp=" + self.component)
+ args.append(self._dscfile)
self.runSubProcess( self._sbuildpath, args )
def iterate_SBUILD(self, success):
=== modified file 'lpbuildd/tests/test_binarypackage.py'
--- lpbuildd/tests/test_binarypackage.py 2014-05-04 21:35:37 +0000
+++ lpbuildd/tests/test_binarypackage.py 2014-07-24 13:40:35 +0000
@@ -77,7 +77,8 @@
# after INIT.
self.buildmanager.initiate(
{'foo_1.dsc': ''}, 'chroot.tar.gz',
- {'suite': 'warty', 'ogrecomponent': 'main'})
+ {'distribution': 'ubuntu', 'suite': 'warty',
+ 'ogrecomponent': 'main'})
# Skip DebianBuildManager states to the state directly before
# SBUILD.
@@ -88,8 +89,8 @@
self.assertEqual(BinaryPackageBuildState.SBUILD, self.getState())
expected_command = [
'sbuildpath', 'sbuild-package', self.buildid, 'i386', 'warty',
- 'sbuildargs', '--dist=warty', '--architecture=i386', '--comp=main',
- 'foo_1.dsc',
+ 'sbuildargs', '--archive=ubuntu', '--dist=warty',
+ '--architecture=i386', '--comp=main', 'foo_1.dsc',
]
self.assertEqual(expected_command, self.buildmanager.commands[-1])
self.assertEqual(
@@ -212,7 +213,8 @@
# pretends that it was terminated by a signal.
self.buildmanager.initiate(
{'foo_1.dsc': ''}, 'chroot.tar.gz',
- {'suite': 'warty', 'ogrecomponent': 'main'})
+ {'distribution': 'ubuntu', 'suite': 'warty',
+ 'ogrecomponent': 'main'})
self.buildmanager.abort()
expected_command = [
Follow ups