From 964bf772ba73aa78243760f86c234acb4ac06bfa Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 8 Feb 2015 18:12:34 +0100 Subject: [PATCH] hooks/register-pkg: register 32bit pkgs in cross mode too. You can now build 32bit pkgs in cross compilation mode (-a i686). --- common/hooks/post-pkg/00-register-pkg.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/common/hooks/post-pkg/00-register-pkg.sh b/common/hooks/post-pkg/00-register-pkg.sh index 4082067bbe8..5d5c9980fc6 100644 --- a/common/hooks/post-pkg/00-register-pkg.sh +++ b/common/hooks/post-pkg/00-register-pkg.sh @@ -7,17 +7,16 @@ registerpkg() { msg_error "Unexistent binary package ${repo}/${pkg}!\n" fi - if [ -n "${arch}" ]; then - export XBPS_TARGET_ARCH=${arch} - fi msg_normal "Registering ${pkg} into ${repo} ...\n" - - if [ -n "$XBPS_CROSS_BUILD" ]; then - $XBPS_RINDEX_XCMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${repo}/${pkg} + if [ -n "${arch}" ]; then + XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${repo}/${pkg} else - $XBPS_RINDEX_CMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${repo}/${pkg} + if [ -n "$XBPS_CROSS_BUILD" ]; then + $XBPS_RINDEX_XCMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${repo}/${pkg} + else + $XBPS_RINDEX_CMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${repo}/${pkg} + fi fi - unset XBPS_TARGET_ARCH } hook() {