xbps-src: use -1 to trigger errors on missing deps

This commit is contained in:
Toyam Cox 2017-09-03 22:08:25 -04:00
parent 7d0cbf8e27
commit bfbfbf2cab
3 changed files with 19 additions and 2 deletions

View File

@ -365,6 +365,21 @@ install_pkg_deps() {
missing_rdeps+=("${_realpkg}")
done
if [ -n "$XBPS_BUILD_ONLY_ONE_PKG" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "0" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "no" ]; then
for i in ${host_missing_deps[@]}; do
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
done
for i in ${check_missing_deps[@]}; do
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
done
for i in ${missing_rdeps[@]}; do
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
done
for i in ${missing_deps[@]}; do
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
done
fi
# Missing host dependencies, build from srcpkgs.
for i in ${host_missing_deps[@]}; do
# packages not found in repos, install from source.

View File

@ -197,6 +197,7 @@ chroot_handler() {
[ -n "$XBPS_MAKEJOBS" ] && arg="$arg -j$XBPS_MAKEJOBS"
[ -n "$XBPS_DEBUG_PKGS" ] && arg="$arg -g"
[ -z "$XBPS_CHECK_PKGS" -o "$XBPS_CHECK_PKGS" = "0" -o "$XBPS_CHECK_PKGS" = "no" ] && arg="$arg -Q"
[ -n "$XBPS_BUILD_ONLY_ONE_PKG" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "0" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "no" ] && arg="$arg -1"
[ -n "$XBPS_QUIET" ] && arg="$arg -q"
[ -n "$XBPS_SKIP_DEPS" ] && arg="$arg -I"
[ -n "$XBPS_ALT_REPOSITORY" ] && arg="$arg -r $XBPS_ALT_REPOSITORY"

View File

@ -414,13 +414,14 @@ readonly XBPS_GCC_VERSION=${XBPS_GCC_VERSION_MAJOR}.${XBPS_GCC_VERSION_MINOR}.${
# main()
#
XBPS_OPTIONS=
XBPS_OPTSTRING="a:CEfgGhH:iIj:Lm:No:qQr:tV"
XBPS_OPTSTRING="1a:CEfgGhH:iIj:Lm:No:qQr:tV"
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
while getopts "$XBPS_OPTSTRING" opt; do
case $opt in
1) export XBPS_BUILD_ONLY_ONE_PKG=yes; XBPS_OPTIONS+=" -1";;
a) readonly XBPS_CROSS_BUILD="$OPTARG"; XBPS_OPTIONS+=" -a $OPTARG";;
C) readonly XBPS_KEEP_ALL=1; XBPS_OPTIONS+=" -C";;
E) readonly XBPS_BINPKG_EXISTS=1; XBPS_OPTIONS+=" -E";;
@ -569,7 +570,7 @@ fi
export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
XBPS_SRCPKGDIR XBPS_COMMONDIR XBPS_BUILDDIR XBPS_REPO_DELTAS \
XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_SRCDISTDIR XBPS_DIGEST_CMD \
XBPS_UHELPER_CMD XBPS_INSTALL_CMD XBPS_QUERY_CMD \
XBPS_UHELPER_CMD XBPS_INSTALL_CMD XBPS_QUERY_CMD XBPS_BUILD_ONLY_ONE_PKG \
XBPS_RINDEX_CMD XBPS_RECONFIGURE_CMD XBPS_REMOVE_CMD \
XBPS_CMPVER_CMD XBPS_FETCH_CMD XBPS_VERSION XBPS_APIVER XBPS_BUILDSTYLEDIR \
XBPS_CPPFLAGS XBPS_CFLAGS XBPS_CXXFLAGS XBPS_FFLAGS XBPS_LDFLAGS \