From 5a7e73b89ac61a5794f7ea9cc5ef89c0c55a5d47 Mon Sep 17 00:00:00 2001 From: Toyam Cox Date: Mon, 7 Aug 2017 00:33:13 -0400 Subject: [PATCH] xbps-src: add informative run mode --- common/xbps-src/shutils/common.sh | 3 +-- xbps-src | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 5a6b52379e3..c5f330d448d 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -58,7 +58,7 @@ msg_red_nochroot() { msg_error() { msg_red "$@" - exit 1 + [ -n "$XBPS_INFORMATIVE_RUN" ] || exit 1 } msg_warn() { @@ -95,7 +95,6 @@ set_build_options() { return 0 fi - for f in ${build_options}; do _pkgname=${pkgname//\-/\_} _pkgname=${_pkgname//\+/\_} diff --git a/xbps-src b/xbps-src index ac672135c5d..74ba88e96bd 100755 --- a/xbps-src +++ b/xbps-src @@ -322,7 +322,6 @@ reconfigure_bootstrap_pkgs() { touch -f $statefile } - bootstrap_update() { if [ -z "$CHROOT_READY" ]; then return @@ -415,7 +414,7 @@ readonly XBPS_GCC_VERSION=${XBPS_GCC_VERSION_MAJOR}.${XBPS_GCC_VERSION_MINOR}.${ # main() # XBPS_OPTIONS= -XBPS_OPTSTRING="a:CEfgGhH:Ij:Lm:No:qr:tV" +XBPS_OPTSTRING="a:CEfgGhH:iIj:Lm:No:qr:tV" # Preprocess arguments in order to allow options before and after XBPS_TARGET. eval set -- $(getopt "$XBPS_OPTSTRING" "$@"); @@ -430,6 +429,7 @@ while getopts "$XBPS_OPTSTRING" opt; do g) readonly XBPS_DEBUG_PKGS=1; XBPS_OPTIONS+=" -g";; H) readonly XBPS_HOSTDIR="$(readlink -f $OPTARG 2>/dev/null)"; XBPS_OPTIONS+=" -H $XBPS_HOSTDIR";; h) usage && exit 0;; + i) export XBPS_INFORMATIVE_RUN=1; XBPS_OPTIONS+=" -i";; I) readonly XBPS_SKIP_DEPS=1; XBPS_OPTIONS+=" -I";; j) export XBPS_MAKEJOBS="$OPTARG"; XBPS_OPTIONS+=" -j $OPTARG";; L) export NOCOLORS=1; XBPS_OPTIONS+=" -L";;