From 6aafc793dde2c507d296522c6ab88610f844d190 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Fri, 17 Dec 2010 13:56:36 +0100 Subject: [PATCH] Fix indentation and formatting of previous commit. --- debian/changelog | 2 +- pbuilder-dist | 12 ++++++------ ubuntutools/builder.py | 18 ++++++++++-------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index b43445a..2b54b6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,7 @@ ubuntu-dev-tools (0.108) UNRELEASED; urgency=low [ Bilal Akhtar ] * pbuilder-dist: Override the default build result location if - --buildresult is specified. + --buildresult is specified. -- Benjamin Drung Thu, 16 Dec 2010 23:40:14 +0100 diff --git a/pbuilder-dist b/pbuilder-dist index 31009db..b0f344b 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -177,13 +177,13 @@ class pbuilder_dist: + self.build_architecture) prefix = os.path.join(self.base, self.chroot_string) - if '--buildresult' not in remaining_arguments: + if '--buildresult' not in remaining_arguments: result = '%s_result/' % prefix - else: - location_of_arg = remaining_arguments.index('--buildresult') - result = remaining_arguments[location_of_arg+1] - remaining_arguments.pop(location_of_arg+1) - remaining_arguments.pop(location_of_arg) + else: + location_of_arg = remaining_arguments.index('--buildresult') + result = remaining_arguments[location_of_arg+1] + remaining_arguments.pop(location_of_arg+1) + remaining_arguments.pop(location_of_arg) if not self.logfile and self.operation != 'login': self.logfile = os.path.normpath('%s/last_operation.log' % result) diff --git a/ubuntutools/builder.py b/ubuntutools/builder.py index 6876e88..cafab61 100644 --- a/ubuntutools/builder.py +++ b/ubuntutools/builder.py @@ -50,15 +50,17 @@ class Pbuilder(Builder): Logger.command(cmd) return subprocess.call(cmd) + class Pbuilderdist(Builder): def __init__(self): - Builder.__init__(self, "pbuilder-dist") + Builder.__init__(self, "pbuilder-dist") def build(self, dsc_file, dist, result_directory): - cmd = ["pbuilder-dist", dist, self.architecture, - "build", dsc_file, "--buildresult", result_directory] - Logger.command(cmd) - return subprocess.call(cmd) + cmd = ["pbuilder-dist", dist, self.architecture, + "build", dsc_file, "--buildresult", result_directory] + Logger.command(cmd) + return subprocess.call(cmd) + class Sbuild(Builder): def __init__(self): @@ -84,9 +86,9 @@ def getBuilder(builder=None): if builder == 'pbuilder': return Pbuilder() elif builder == 'pbuilder-dist': - return Pbuilderdist() + return Pbuilderdist() elif builder == 'sbuild': return Sbuild() - Logger.error("Unsupported builder specified: %s. Only pbuilder, pbuilder-dist and " - "sbuild are supported." % builder) + Logger.error("Unsupported builder specified: %s. Only pbuilder, " + "pbuilder-dist and sbuild are supported." % builder)