Commit 6c5255dc authored by Simon McVittie's avatar Simon McVittie

Add support for bundling updated aclocal macros in the dist tarball

Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent d07944f0
......@@ -407,6 +407,23 @@ class SnapshotBuilder:
if ':/usr/lib/ccache:' not in ':{}:'.format(path):
path = '/usr/lib/ccache:{}'.format(path)
aclocal_path = []
for i, d in enumerate(self.args.aclocal_search):
if self.args.builder == 'localhost':
remote = d
else:
remote = tmpdir + '/aclocal.{}'.format(i)
self.do_locally([
'rsync', '-az', '--delete', d + '/',
self.args.builder + ':' + remote + '/',
])
aclocal_path.append(remote)
for d in self.args.aclocal_search_builder:
aclocal_path.append(d)
# Assume that packages with /configure.ac are Autotools.
# We probe for configure.ac instead of testing for is_native,
# because we could conceivably have native packages that use
......@@ -425,7 +442,12 @@ class SnapshotBuilder:
self.do_in_srcdir(['git', 'status', '-u'])
self.do_in_srcdir(['git', 'clean', '-fxd'])
self.do_in_srcdir(['env', 'NOCONFIGURE=1', './autogen.sh'])
self.do_in_srcdir([
'env',
'ACLOCAL_PATH=' + ':'.join(aclocal_path),
'NOCONFIGURE=1',
'./autogen.sh',
])
self.do_in_srcdir(['./configure'])
if self.args.check:
......@@ -557,8 +579,11 @@ class SnapshotBuilder:
if self.dpkg_version >= Version('1.18.2'):
args.append('-J{}'.format(self.args.jobs))
self.do_in_srcdir(['env', 'PATH={}'.format(path),
self.do_in_srcdir([
'env',
'ACLOCAL_PATH=' + ':'.join(aclocal_path),
'DEB_BUILD_OPTIONS={}'.format(' '.join(deb_build_options)),
'PATH={}'.format(path),
'dpkg-buildpackage'] + build_what + args)
self.do_in_srcdir([
'find', '.', '-name', 'test-suite.log', '-exec',
......@@ -571,9 +596,12 @@ class SnapshotBuilder:
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)),
self.do_in_srcdir([
'env',
'ACLOCAL_PATH=' + ':'.join(aclocal_path),
'CC=gcc -m32',
'DEB_BUILD_OPTIONS={}'.format(' '.join(deb_build_options)),
'PATH={}'.format(path),
'dpkg-buildpackage', '-ai386', '-B'] + args)
self.do_in_srcdir([
'find', '.', '-name', 'test-suite.log', '-exec',
......@@ -700,6 +728,16 @@ def main():
parser.add_argument('-j', '--jobs', type=int,
help='Run this many jobs in parallel', default=5)
parser.add_argument(
'--aclocal-search-builder', metavar='DIR', action='append',
default=[],
help='Look for updated Autoconf m4 macros in DIR on HOSTNAME')
parser.add_argument(
'--aclocal-search', metavar='DIR', action='append',
default=[],
help='Look for updated Autoconf m4 macros in DIR on machine '
'where deb-build-snapshot was invoked')
parser.add_argument('--merge', action='append', metavar='COMMIT',
dest='merges', default=[],
help='merge Git branches or tags, for example "--merge origin/wip"')
......
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