Fix indentation and formatting of previous commit.

This commit is contained in:
Benjamin Drung 2010-12-17 13:56:36 +01:00
parent 1747986a88
commit 6aafc793dd
3 changed files with 17 additions and 15 deletions

2
debian/changelog vendored
View File

@ -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 <bdrung@ubuntu.com> Thu, 16 Dec 2010 23:40:14 +0100

View File

@ -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)

View File

@ -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)