diff --git a/debian/changelog b/debian/changelog index c7552a0..b0b8b1a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ubuntu-dev-tools (0.105) UNRELEASED; urgency=low + + * pbuilder-dist, doc/pbuilder-dist.1: + - Export the distribution and architecture information to the environment + so that it is available in pbuilderrc, etc. (LP: #628933). + + -- Siegfried-Angel Gevatter Pujals Sun, 26 Sep 2010 17:36:59 +0200 + ubuntu-dev-tools (0.104) experimental; urgency=low [ Siegfried-Angel Gevatter Pujals ] diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index 7666a69..60d8923 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -99,6 +99,11 @@ saved in the results subdirectory of each build environment. .PP The default authentication method is \fBsudo\fP. You can change this by setting the \fBPBUILDAUTH\fP variable. +.PP +You may also want to know that \fBpbuilder\-dist\fP exports \fBDIST\fP and +\fBARCH\fP environment variables to the invoked process, containing the name +of the distribution and the architecture targeted by the current build. You +can make use of them, for example, in \fBpbuilderrc\fP. .SH BUGS If you experience any problem with this script contact me on rainct@ubuntu.com diff --git a/pbuilder-dist b/pbuilder-dist index 5599cda..5b048a5 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -259,7 +259,10 @@ class pbuilder_dist: return argument return '"%s"' % argument - return '%s /usr/sbin/%s %s' % (self.auth, self.builder, + # Export the distribution and architecture information to the + # environment so that it is accessible to ~/.pbuilderrc (LP: #628933). + return '%s ARCH="%s" DIST="%s" /usr/sbin/%s %s' % (self.auth, + self.build_architecture, self.target_distro, self.builder, ' '.join(map(quote, arguments))) def ask(question):