From cda175e0d6740ea9f7fdf55729ac7f067bf20c96 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 28 Feb 2015 02:38:00 +0100 Subject: [PATCH] xbps-src: make show-build-deps return err when arch is not supported. --- common/xbps-src/shutils/pkgtarget.sh | 6 +++--- common/xbps-src/shutils/show.sh | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh index feef0025fa6..628d8b8071e 100644 --- a/common/xbps-src/shutils/pkgtarget.sh +++ b/common/xbps-src/shutils/pkgtarget.sh @@ -1,9 +1,9 @@ # vim: set ts=4 sw=4 et: check_pkg_arch() { - local cross="$1" + local cross="$1" err="$2" _arch f found - if [ -n "$BEGIN_INSTALL" -a -n "$only_for_archs" ]; then + if [ -n "$only_for_archs" ]; then if [ -n "$cross" ]; then _arch="$XBPS_TARGET_MACHINE" elif [ -n "$XBPS_ARCH" ]; then @@ -19,7 +19,7 @@ check_pkg_arch() { done if [ -z "$found" ]; then msg_red "$pkgname: this package cannot be built for ${_arch}.\n" - exit 0 + exit ${err:=0} fi fi } diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index 1449bb7f349..20e0c9c9920 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -50,8 +50,7 @@ show_pkg_files() { show_pkg_build_deps() { local f x _pkgname _dep found - BEGIN_INSTALL=1 - check_pkg_arch $XBPS_CROSS_BUILD + check_pkg_arch "$XBPS_CROSS_BUILD" 1 setup_pkg_depends # build time deps for f in ${host_build_depends} ${build_depends} ${run_depends}; do