build: allow choosing on which architecture the arch-independent packages are built (closes: #74930)

Take -a option into account when building an architecture-independent package. It make sense if you want to predict debian binary package names.

authorJulien Cristau <julien.cristau@logilab.fr>
changeset14a5abf11190
branchdefault
phasepublic
hiddenno
parent revision#7c6decd7f118 build: don't run sed on the changelog file to change the distribution
child revision#ead02cbc9d7b Use debian.changelog to add a suffix to the package version
files modified by this revision
lgp/build.py
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1316096965 -7200
# Thu Sep 15 16:29:25 2011 +0200
# Node ID 14a5abf111906f4354b024067045fe9bd221ca15
# Parent 7c6decd7f118d3aaba924e140895160378fa9d1d
build: allow choosing on which architecture the arch-independent packages are built (closes: #74930)

Take -a option into account when building an architecture-independent package.
It make sense if you want to predict debian binary package names.

diff --git a/lgp/build.py b/lgp/build.py
@@ -409,16 +409,16 @@
1          series = []
2          if utils.is_architecture_independent():
3              options = dict()
4              options['distrib'] = distrib
5              options['buildopts'] = _build_options()
6 -            options['arch'] = self.get_architectures(['current'])[0]
7 +            options['arch'] = (self.config.archi or self.get_architectures(['current']))[0]
8              options['image'] = self.get_basetgz(options['distrib'],
9                                                  options['arch'])
10              series.append(options)
11              self.logger.info('this build is arch-independent. Lgp will only build on '
12 -                             'current architecture (%s)' % options['arch'])
13 +                             'architecture %s' % options['arch'])
14          else:
15              for rank, arch in enumerate(self.get_architectures()):
16                  options = dict()
17                  options['distrib'] = distrib
18                  options['buildopts'] = _build_options(arch, rank)