]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Rename pbuilder environment variable ARCH to ARCHITECTURE.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Thu, 9 Jan 2014 13:18:35 +0000 (14:18 +0100)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Thu, 9 Jan 2014 13:18:35 +0000 (14:18 +0100)
pbuilder falsely passes all environment variables into the chroot system.
The ARCH enviroment variable causes a build failure in the ethoip6 package.

.pbuilderrc
lib/pbuilder.py

index 2567d7afe80932b99a53ab37fdaa4f5b325f6a04..965db7bc3c61f35b806a0317e93da330f81fa33d 100644 (file)
@@ -43,16 +43,16 @@ esac
 
 
 
-: ${ARCH:="$(dpkg --print-architecture)"}
+: ${ARCHITECTURE:="$(dpkg --print-architecture)"}
 
 DEBOOTSTRAPOPTS=(
     '--variant=buildd'
 )
 
 NAME="$DIST"
-if [ -n "${ARCH}" ]; then
-    NAME="$NAME-$ARCH"
-    DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
+if [ -n "${ARCHITECTURE}" ]; then
+    NAME="$NAME-$ARCHITECTURE"
+    DEBOOTSTRAPOPTS=("--arch" "$ARCHITECTURE" "${DEBOOTSTRAPOPTS[@]}")
 fi
 
 #BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
index 70fa87d28a514bf1895084637d2baf830f6829be..c1a4f8d20c1244c14d2023bdd40ba472c681dd77 100644 (file)
@@ -36,7 +36,7 @@ class Pbuilder(object):
         '''
         result = os.environ
         result['DIST'] = self.dist
-        result['ARCH'] = self.arch
+        result['ARCHITECTURE'] = self.arch
         result['PB_SUITE'] = self.pb_suite
         result['GIT_COMMIT_ID'] = self.git_commit_id
         return result