fix the use of dpkg-buildpackage -A and -B options (closes #18804)

authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
changeset56b58860e630
branchdefault
phasepublic
hiddenno
parent revision#83ad6a4788bd lgp: fix wrong dpkg-source call + minor changes
child revision#001e67c79db2 prepare 0.16.3
files modified by this revision
lgp/build.py
# HG changeset patch
# User Alexandre Fayolle <alexandre.fayolle@logilab.fr>
# Date 1256207266 -7200
# Thu Oct 22 12:27:46 2009 +0200
# Node ID 56b58860e63032109627a5084b4e885814bb726c
# Parent 83ad6a4788bd55a47f552775b59db46f02add7d4
fix the use of dpkg-buildpackage -A and -B options (closes #18804)

diff --git a/lgp/build.py b/lgp/build.py
@@ -290,18 +290,17 @@
1          architecture-independant packages
2 
3          You have the possiblity to add some dpkg-buildpackage options with the
4          DEBBUILDOPTS environment variable.
5          """
6 -        def _build_options(arch=None):
7 +        def _build_options(arch=None, rank=0):
8              optline = list()
9              #optline.append('-b')
10              if arch:
11 -                optline.append('-B')
12 +                if rank:
13 +                    optline.append('-B')
14                  optline.append('-a%s' % arch)
15 -            else:
16 -                optline.append('-A')
17              if os.environ.get('DEBBUILDOPTS'):
18                  optline.append(os.environ.get('DEBBUILDOPTS'))
19              return ' '.join(optline)
20 
21          series = []
@@ -314,14 +313,14 @@
22                                                  options['arch'])
23              series.append(options)
24              logging.info('this build is arch-independant. Lgp will only build on '
25                           'current architecture (%s)' % options['arch'])
26          else:
27 -            for arch in self.architectures:
28 +            for rank, arch in enumerate(self.architectures):
29                  options = dict()
30                  options['distrib'] = self.current_distrib
31 -                options['buildopts'] = _build_options(arch)
32 +                options['buildopts'] = _build_options(arch, rank)
33                  options['arch'] = arch
34                  options['image'] = self.get_basetgz(options['distrib'],
35                                                      options['arch'])
36                  series.append(options)
37          return series