mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
pbuilder-dist: Override the default build result location if
--buildresult is specified.
This commit is contained in:
parent
8eda0c4326
commit
1747986a88
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -15,6 +15,10 @@ ubuntu-dev-tools (0.108) UNRELEASED; urgency=low
|
|||||||
[ Evan Broder ]
|
[ Evan Broder ]
|
||||||
* backportpackage: new script for testing backport requests in a PPA.
|
* backportpackage: new script for testing backport requests in a PPA.
|
||||||
|
|
||||||
|
[ Bilal Akhtar ]
|
||||||
|
* pbuilder-dist: Override the default build result location if
|
||||||
|
--buildresult is specified.
|
||||||
|
|
||||||
-- Benjamin Drung <bdrung@ubuntu.com> Thu, 16 Dec 2010 23:40:14 +0100
|
-- Benjamin Drung <bdrung@ubuntu.com> Thu, 16 Dec 2010 23:40:14 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.107) experimental; urgency=low
|
ubuntu-dev-tools (0.107) experimental; urgency=low
|
||||||
|
@ -177,7 +177,13 @@ class pbuilder_dist:
|
|||||||
+ self.build_architecture)
|
+ self.build_architecture)
|
||||||
|
|
||||||
prefix = os.path.join(self.base, self.chroot_string)
|
prefix = os.path.join(self.base, self.chroot_string)
|
||||||
result = '%s_result/' % prefix
|
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)
|
||||||
|
|
||||||
if not self.logfile and self.operation != 'login':
|
if not self.logfile and self.operation != 'login':
|
||||||
self.logfile = os.path.normpath('%s/last_operation.log' % result)
|
self.logfile = os.path.normpath('%s/last_operation.log' % result)
|
||||||
|
@ -50,6 +50,15 @@ class Pbuilder(Builder):
|
|||||||
Logger.command(cmd)
|
Logger.command(cmd)
|
||||||
return subprocess.call(cmd)
|
return subprocess.call(cmd)
|
||||||
|
|
||||||
|
class Pbuilderdist(Builder):
|
||||||
|
def __init__(self):
|
||||||
|
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)
|
||||||
|
|
||||||
class Sbuild(Builder):
|
class Sbuild(Builder):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -74,8 +83,10 @@ def getBuilder(builder=None):
|
|||||||
|
|
||||||
if builder == 'pbuilder':
|
if builder == 'pbuilder':
|
||||||
return Pbuilder()
|
return Pbuilder()
|
||||||
|
elif builder == 'pbuilder-dist':
|
||||||
|
return Pbuilderdist()
|
||||||
elif builder == 'sbuild':
|
elif builder == 'sbuild':
|
||||||
return Sbuild()
|
return Sbuild()
|
||||||
|
|
||||||
Logger.error("Unsupported builder specified: %s. Only pbuilder and "
|
Logger.error("Unsupported builder specified: %s. Only pbuilder, pbuilder-dist and "
|
||||||
"sbuild are supported." % builder)
|
"sbuild are supported." % builder)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user