[pbuilder] 01/02: checkparams: make sure ARCHITECTURE is always defined

Mattia Rizzolo mattia at debian.org
Sun Jan 15 16:15:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pbuilder.

commit ac67a42b40c2b3f488dcf7e01305d316dcbfde43
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sun Jan 15 17:11:03 2017 +0100

    checkparams: make sure ARCHITECTURE is always defined
---
 pbuilder-checkparams | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index fd4c4a4..ad52913 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -350,9 +350,6 @@ log.d "cmdline: ${PBUILDER_OPERATION} ${CMDLINE}"
 
 BUILDPLACE=${BUILDPLACE?"Build root directory is not defined"}
 
-# if HOST_ARCH is not defined at this point, we are doing a native build
-HOST_ARCH=${HOST_ARCH:-${ARCHITECTURE}}
-
 # the default is to add a PID in the buildplace specified in the config file.
 BASEBUILDPLACE="$BUILDPLACE"
 if [ "${INTERNAL_BUILD_UML}" != "yes" -a "${PRESERVE_BUILDPLACE}" != "yes" ]; then
@@ -385,6 +382,12 @@ if [ -z "${CHROOTEXEC}" ]; then
     fi
 fi
 
+# if ARCHITECTURE is still not defined, get the data out of the chroot
+ARCHITECTURE="${ARCHITECTURE:-$($CHROOTEXEC dpkg-architecture -qDEB_BUILD_ARCH)}"
+
+# if HOST_ARCH is not defined at this point, we are doing a native build
+HOST_ARCH=${HOST_ARCH:-${ARCHITECTURE}}
+
 # handle 'experimental' specially. -- required for raw pbuilder (create/update) only.
 case "$PBUILDER_OPERATION" in
     update|create)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list