diff --git a/doc/backportpackage.1 b/doc/backportpackage.1 index db0ea26..3ffb615 100644 --- a/doc/backportpackage.1 +++ b/doc/backportpackage.1 @@ -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 diff --git a/doc/sponsor-patch.1 b/doc/sponsor-patch.1 index 9b870f1..9fd871a 100644 --- a/doc/sponsor-patch.1 +++ b/doc/sponsor-patch.1 @@ -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. diff --git a/ubuntutools/builder.py b/ubuntutools/builder.py index 6e51283..ccf11ca 100644 --- a/ubuntutools/builder.py +++ b/ubuntutools/builder.py @@ -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)