Commit d07944f0 authored by Simon McVittie's avatar Simon McVittie

Add --i386 option

When building a package that needs to be multiarch-installed for
amd64 and i386, this is convenient.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 4d29d598
......@@ -201,6 +201,9 @@ class SnapshotBuilder:
if not self.args.source_only and not self.args.print_version:
self.do_in_srcdir(['dpkg-checkbuilddeps'])
if self.args.i386:
self.do_in_srcdir(['dpkg-checkbuilddeps', '-ai386', '-B'])
source_package = self.capture_in_srcdir(['dpkg-parsechangelog',
'-SSource']).strip('\n')
......@@ -529,12 +532,14 @@ class SnapshotBuilder:
'snapshot: commit {} ({} commits after {})'.format(
commit, counter, reference_point)])
args = ['-us', '-uc', '-i', '-I']
if self.args.source_only:
args = ['-S', '-d']
build_what = ['-S', '-d']
elif self.args.source:
args = []
build_what = []
else:
args = ['-b']
build_what = ['-b']
deb_build_options = set(self.args.deb_build_options)
......@@ -554,14 +559,29 @@ class SnapshotBuilder:
self.do_in_srcdir(['env', 'PATH={}'.format(path),
'DEB_BUILD_OPTIONS={}'.format(' '.join(deb_build_options)),
'dpkg-buildpackage',
'-us', '-uc', '-i', '-I'] + args)
'dpkg-buildpackage'] + build_what + args)
self.do_in_srcdir([
'find', '.', '-name', 'test-suite.log', '-exec',
'head', '-v', '-n10000', '{}', ';'])
if os.path.exists('.git'):
self.do_in_srcdir(['git', 'status', '-u'])
if self.args.i386 and not self.args.source_only:
if os.path.exists('.git'):
self.do_in_srcdir(['git', 'clean', '-fxd'])
self.do_in_srcdir(['env', 'PATH={}'.format(path),
'DEB_BUILD_OPTIONS={}'.format(' '.join(deb_build_options)),
'CC=gcc -m32',
'dpkg-buildpackage', '-ai386', '-B'] + args)
self.do_in_srcdir([
'find', '.', '-name', 'test-suite.log', '-exec',
'head', '-v', '-n10000', '{}', ';'])
if os.path.exists('.git'):
self.do_in_srcdir(['git', 'status', '-u'])
if self.args.download is not None:
if self.args.builder != 'localhost':
self.do_locally(['rsync', '-zvP',
......@@ -630,6 +650,9 @@ def main():
help='Build a source package only',
action='store_true', default=False, dest='source_only')
parser.add_argument('--i386', help='Build i386 binaries too',
action='store_true', default=False)
parser.add_argument('--dry-run', '-n',
help='Do not really run build commands (default: really build)',
action='store_false', default=True, dest='really')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment