From 0e74f8bc1838601ad7c4c4f5f2e7b22e5c508175 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 16 Jan 2011 18:13:55 +0100 Subject: [PATCH] xbps-src: bail out if the xbps static utils aren't installed in masterdir. --- xbps-src/xbps-src.sh.in | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 054eb05f3a..3646b025c6 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -50,13 +50,18 @@ check_reqhost_utils() { [ -n "$in_chroot" ] && return 0 - for f in gawk bash sed gcc msgfmt patch makeinfo perl fakeroot \ - xbps-bin.static xbps-repo.static xbps-uhelper.static; do + for f in gawk bash sed gcc msgfmt patch makeinfo perl fakeroot; do if ! command -v ${f} 2>&1 >/dev/null; then echo "${f} is missing in your system, can't continue! exiting..." exit 1 fi done + for f in bin repo uhelper; do + if [ ! -x ${XBPS_MASTERDIR}/usr/local/sbin/xbps-${f}.static ]; then + echo "xbps-${f}.static not found in ${XBPS_MASTERDIR}!" + exit 1 + fi + done } usage() @@ -212,11 +217,6 @@ if [ -z "$target" ]; then usage && exit 1 fi -# -# Check for required utilities in host system. -# -check_reqhost_utils - if [ -n "$in_chroot" ]; then XBPS_CONFIG_FILE="/usr/local/etc/xbps-src.conf" fi @@ -231,6 +231,11 @@ fi . @@XBPS_INSTALL_SHAREDIR@@/shutils/init_funcs.sh set_defvars +# +# Check for required utilities in host system. +# +check_reqhost_utils + . $XBPS_SHUTILSDIR/common_funcs.sh #