xbps-src: make show-build-deps return err when arch is not supported.
This commit is contained in:
parent
429df59e2a
commit
cda175e0d6
2 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue