summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xunperish45
1 files changed, 23 insertions, 22 deletions
diff --git a/unperish b/unperish
index e9fc9bd..33e8e85 100755
--- a/unperish
+++ b/unperish
@@ -253,26 +253,30 @@ class Unperish(cliapp.Application):
'''Build Debian binary packages (.deb) in build area.'''
self.run_subcommand('export')
+
+ targets = {}
for spec in self.settings['basetgz']:
target, arch, path = self.parse_basetgz(spec)
-
+ targets[target] = targets.get(target, []) + [(arch, path)]
+ for target in sorted(targets.keys()):
if target:
- self.add_debian_changelog_entry(target, arch)
- self.run_subcommand('dsc', force=True)
- if not self.already_exists(self.join(self.changes(arch))):
- argv = ['sudo',
- 'pbuilder',
- '--build',
- '--basetgz', path,
- '--buildresult', self.settings['build-area'],
- '--logfile', self.join('pbuilder.log')]
- if self.include_source():
- argv.extend(['--debbuildopts', '-sa'])
- if self.settings['binary-arch']:
- argv.append('--binary-arch')
- argv.append(self.join(self.dsc))
- self.runcmd(argv, cwd=self.settings['build-area'])
-
+ self.add_debian_changelog_entry(target)
+ for arch, path in targets[target]:
+ self.run_subcommand('dsc', force=True)
+ if not self.already_exists(self.join(self.changes(arch))):
+ argv = ['sudo',
+ 'pbuilder',
+ '--build',
+ '--basetgz', path,
+ '--buildresult', self.settings['build-area'],
+ '--logfile', self.join('pbuilder.log')]
+ if self.include_source():
+ argv.extend(['--debbuildopts', '-sa'])
+ if self.settings['binary-arch']:
+ argv.append('--binary-arch')
+ argv.append(self.join(self.dsc))
+ self.runcmd(argv, cwd=self.settings['build-area'])
+
def include_source(self):
'''Should the upload include full source?'''
if self.settings['full-source'] == 'yes':
@@ -374,11 +378,8 @@ class Unperish(cliapp.Application):
else:
os.remove(pathname)
- def add_debian_changelog_entry(self, target, arch):
- if arch:
- msg = 'Build for %s on %s.' % (target, arch)
- else:
- msg = 'Build for %s.' % target
+ def add_debian_changelog_entry(self, target):
+ msg = 'Build for %s.' % target
self.runcmd(['dch',
'--force-distribution',
'--local', '~' + target,