diff --git a/webbuild/webbuild-functions b/webbuild/webbuild-functions index 3812173..8b7c76e 100644 --- a/webbuild/webbuild-functions +++ b/webbuild/webbuild-functions @@ -289,7 +289,7 @@ function environment_logdir() { elif [ "${AUTOPORT_NATIVE[$env]}" ]; then local envhome=`eval echo ~${AUTOPORT_CHROOT_USER[$env]}` if [ "${AUTOPORT_CHROOT_USER[$env]}" = "autodist" ]; then - echo "$envhome/log" + echo "/var/autodist/log/" else echo "$envhome/.autodist/log/" fi diff --git a/webbuild/webbuild-functions-private b/webbuild/webbuild-functions-private index 96d1293..def46ca 100644 --- a/webbuild/webbuild-functions-private +++ b/webbuild/webbuild-functions-private @@ -33,16 +33,8 @@ function showlog() { LOGDIR=`environment_logdir $ENVIRONMENT` LOGFILES="$LOGDIR/$LOGFILE1 $LOGDIR/$LOGFILE2 $LOGDIR/$LOGFILE3 $LOGDIR/$LOGFILE4" - - for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do - [ "$i" = "$ENVIRONMENT" ] && continue - [ "${AUTOPORT_ARCH[$i]}" = "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] || continue - if [ "${AUTOPORT_UPDATE[$i]}" ]; then - LOGDIR="/var/autodist/log" - LOGFILES="$LOGFILES $LOGDIR/$LOGFILE1 $LOGDIR/$LOGFILE2 $LOGDIR/$LOGFILE3 $LOGDIR/$LOGFILE4" - fi - done - LOGFILES=`ls -t $LOGFILES | head -1` + # sort by most recent and take first + LOGFILES=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls -t $LOGFILES 2>/dev/null | head -1"` fi echo -n "Console output for $PACKAGE ($LOGTYPE$LOGSTATUSAPPEND):" echo "
"