[pbuilder] 02/02: checkparams: fix native build fall back

Mattia Rizzolo mattia at debian.org
Thu Nov 10 23:10:25 UTC 2016


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

mattia pushed a commit to branch master
in repository pbuilder.

commit d2c48e50b50031ff84edfc9234c241e88c6752e9
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Nov 10 23:09:45 2016 +0000

    checkparams: fix native build fall back
    
    Thanks: jrtc27 for spotting
    
    Gbp-Dch: Ignore
---
 pbuilder-checkparams | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index 4f36312..8da1f7d 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -36,7 +36,6 @@ OVERRIDE_APTLINES="no"
 OVERRIDE_APTLINES_WARN="" # set this if --override-config option should be set.
 BINARY_ARCH="any"  # can be one of 'any', 'all', 'binary'
 BIN_NMU="no"
-HOST_ARCH="${HOST_ARCH:-$ARCHITECTURE}"
 PBUILDER_BUILD_LOGFILE=
 PRESERVE_BUILDPLACE="no"
 unset EXTRA_CONFIGFILE || true
@@ -90,10 +89,6 @@ while [ -n "$1" ]; do
         shift; shift;
         ;;
     --architecture)
-        # if we were doing a native build before, still continue to be native
-        if [ "$ARCHITECTURE" = "$HOST_ARCH" ]; then
-            HOST_ARCH=$2
-        fi
         ARCHITECTURE="$2";
         shift; shift;
         ;;
@@ -347,6 +342,9 @@ 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

-- 
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