diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh index 2180e238266..7c533c2a869 100755 --- a/common/xbps-src/libexec/build.sh +++ b/common/xbps-src/libexec/build.sh @@ -29,7 +29,7 @@ install_cross_pkg $XBPS_CROSS_BUILD # Install dependencies from binary packages if [ "$PKGNAME" != "$TARGET_PKG" -o -z "$XBPS_SKIP_DEPS" ]; then - install_pkg_deps $PKGNAME $TARGET_PKG pkg $XBPS_CROSS_BUILD || exit 1 + install_pkg_deps $PKGNAME $TARGET_PKG pkg $XBPS_CROSS_BUILD || exit $? fi # Fetch distfiles after installing required dependencies, diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh index 86b14390fc7..88704d76344 100644 --- a/common/xbps-src/shutils/build_dependencies.sh +++ b/common/xbps-src/shutils/build_dependencies.sh @@ -348,8 +348,8 @@ install_pkg_deps() { setup_pkg $pkg msg_error "$pkgver: required host dependency '$i' cannot be resolved!\n" fi - exec env XBPS_BINPKG_EXISTS=1 $XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target || exit 1 - ) || exit 1 + exec env XBPS_BINPKG_EXISTS=1 $XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target || exit $? + ) || exit $? host_binpkg_deps+=("$i") done @@ -364,8 +364,8 @@ install_pkg_deps() { setup_pkg $pkg $cross msg_error "$pkgver: required target dependency '$i' cannot be resolved!\n" fi - exec env XBPS_BINPKG_EXISTS=1 $XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross || exit 1 - ) || exit 1 + exec env XBPS_BINPKG_EXISTS=1 $XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross || exit $? + ) || exit $? binpkg_deps+=("$i") done diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 8035cb4d67a..3fc0f20892f 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -425,11 +425,11 @@ setup_pkg() { if [ "$cross" -a "$nocross" ]; then msg_red "$pkgver: cannot be cross compiled, exiting...\n" - exit 0 + exit 2 elif [ "$broken" ]; then msg_red "$pkgver: cannot be built, it's currently broken; see the build log:\n" msg_red "$pkgver: $broken\n" - exit 0 + exit 2 fi export XBPS_STATEDIR="${XBPS_BUILDDIR}/.xbps-${sourcepkg}" diff --git a/xbps-src b/xbps-src index 6e07411fd0e..ae64a30ab41 100755 --- a/xbps-src +++ b/xbps-src @@ -618,7 +618,7 @@ case "$XBPS_TARGET" in else [ -z "$XBPS_TEMP_MASTERDIR" ] && remove_pkg_autodeps $XBPS_LIBEXECDIR/build.sh $XBPS_TARGET_PKG $XBPS_TARGET_PKG \ - $XBPS_TARGET $XBPS_CROSS_BUILD || exit 1 + $XBPS_TARGET $XBPS_CROSS_BUILD || exit $? fi ;; remove|remove-destdir)