LASTEXIT=0
START_TIME=$SECONDS
+ # the tee is a handy debugging tool when stumpage is exceedingly strong
+ #LASTOUT=$( bash -c "$2" 2>&1 | tee /dev/stderr) || LASTEXIT=$?
LASTOUT=$( bash -c "$2" 2>&1 ) || LASTEXIT=$?
DELTA_TIME=$(( $SECONDS - $START_TIME ))
fi
}
+apt_install() {
+ # flatten
+ pkgs="$@"
+
+ # Need to do this at every step, the sources list may very well have changed
+ run_or_err "Updating APT available package list" "sudo apt-get update"
+
+ run_or_err "Installing Debian APT packages: $pkgs" "sudo apt-get install --allow-unauthenticated --no-install-recommends -y $pkgs"
+}
+
extract_prereqs() {
# once --verbose is set, --no-verbose can't disable it
# do this by hand
exit 1
fi
- # throw away ascii art, convert to modnames
- PQ=$(perl -p -e 's/^[^a-z]+//i; s/\-[^\-]+$/ /; s/\-/::/g' <<< "$OUT")
+ # throw away warnings, ascii art, convert to modnames
+ PQ=$(perl -p -e 's/^\!.*//; s/^[^a-z]+//i; s/\-[^\-]+$/ /; s/\-/::/g' <<< "$OUT")
# throw away what was in $@
for m in "$@" ; do
if [[ "$LASTEXIT" = "0" ]] ; then
echo_err "done (took ${DELTA_TIME}s)"
else
- echo_err -n "failed (after ${DELTA_TIME}s Exit:$LASTEXIT Log:$(/usr/bin/nopaste -q -s Shadowcat -d "Parallel installfail" <<< "$LASTOUT")) retrying with sequential testing ... "
+ local errlog="after ${DELTA_TIME}s Exit:$LASTEXIT Log:$(/usr/bin/nopaste -q -s Shadowcat -d "Parallel installfail" <<< "$LASTOUT")"
+ echo_err -n "failed ($errlog) retrying with sequential testing ... "
+ POSTMORTEM="$POSTMORTEM$(
+ echo
+ echo "Depinstall under $HARNESS_OPTIONS parallel testing failed $errlog"
+ echo "============================================================="
+ echo "Attempted installation of: $@"
+ echo "============================================================="
+ )"
HARNESS_OPTIONS=""
LASTEXIT=0