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:
|
# vim: set ts=4 sw=4 et:
|
||||||
|
|
||||||
check_pkg_arch() {
|
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
|
if [ -n "$cross" ]; then
|
||||||
_arch="$XBPS_TARGET_MACHINE"
|
_arch="$XBPS_TARGET_MACHINE"
|
||||||
elif [ -n "$XBPS_ARCH" ]; then
|
elif [ -n "$XBPS_ARCH" ]; then
|
||||||
|
@ -19,7 +19,7 @@ check_pkg_arch() {
|
||||||
done
|
done
|
||||||
if [ -z "$found" ]; then
|
if [ -z "$found" ]; then
|
||||||
msg_red "$pkgname: this package cannot be built for ${_arch}.\n"
|
msg_red "$pkgname: this package cannot be built for ${_arch}.\n"
|
||||||
exit 0
|
exit ${err:=0}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,7 @@ show_pkg_files() {
|
||||||
show_pkg_build_deps() {
|
show_pkg_build_deps() {
|
||||||
local f x _pkgname _dep found
|
local f x _pkgname _dep found
|
||||||
|
|
||||||
BEGIN_INSTALL=1
|
check_pkg_arch "$XBPS_CROSS_BUILD" 1
|
||||||
check_pkg_arch $XBPS_CROSS_BUILD
|
|
||||||
setup_pkg_depends
|
setup_pkg_depends
|
||||||
# build time deps
|
# build time deps
|
||||||
for f in ${host_build_depends} ${build_depends} ${run_depends}; do
|
for f in ${host_build_depends} ${build_depends} ${run_depends}; do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue