builder.py: Pass ARCH to pbuilder too.

This commit is contained in:
Benjamin Drung 2010-12-25 20:05:38 +01:00
parent 3f3018aef2
commit c8e71cacee
3 changed files with 10 additions and 9 deletions

View File

@ -47,8 +47,8 @@ defaults to \fB~ppa1\fR, otherwise the default is blank.
.B \-b\fR, \fB\-\-build
Build the package with the specified builder before uploading. Note
for \fBpbuilder\fR(8) users: This assumes the common configuration,
where the \fBDIST\fR environment is read by \fBpbuilderrc\fR(5) to
select the correct base image.
where the \fBARCH\fR and \fBDIST\fR environment is read by \fBpbuilderrc\fR(5)
to select the correct base image.
.TP
.B \-B \fIBUILDER\fR, \fB\-\-builder\fR=\fIBUILDER
Use the specified builder to build the package. Supported are

View File

@ -55,8 +55,8 @@ The output of the build tool will be placed in \fIworkdir\fR/\fBbuildresult/\fR.
.TP
.BR \-b ", " \-\-build
Build the package with the specified builder. Note for \fBpbuilder\fR(8) users:
This assumes the common configuration, where the \fBDIST\fR environment is read
by \fBpbuilderrc\fR(5) to select the correct base image.
This assumes the common configuration, where the \fBARCH\fR and \fBDIST\fR
environment is read by \fBpbuilderrc\fR(5) to select the correct base image.
.TP
.B \-B \fIBUILDER\fR, \fB\-\-builder\fR=\fIBUILDER
Use the specify builder to build the package.

View File

@ -60,17 +60,18 @@ class Pbuilder(Builder):
def build(self, dsc_file, dist, result_directory):
_build_preparation(result_directory)
# TODO: Do not rely on a specific pbuilder configuration.
cmd = ["sudo", "-E", "DIST=" + dist, "pbuilder", "--build",
"--distribution", dist, "--architecture", self.architecture,
cmd = ["sudo", "-E", "ARCH=" + self.architecture, "DIST=" + dist,
"pbuilder", "--build",
"--architecture", self.architecture, "--distribution", dist,
"--buildresult", result_directory, dsc_file]
Logger.command(cmd)
returncode = subprocess.call(cmd)
return self._build_failure(returncode, dsc_file)
def update(self, dist):
cmd = ["sudo", "-E", "DIST=" + dist, "pbuilder", "--update",
"--distribution", dist, "--architecture", self.architecture]
cmd = ["sudo", "-E", "ARCH=" + self.architecture, "DIST=" + dist,
"pbuilder", "--update",
"--architecture", self.architecture, "--distribution", dist]
Logger.command(cmd)
returncode = subprocess.call(cmd)
return self._update_failure(returncode, dist)