From 5e4081a3350f6e0daaa91d274f79ee217b46ad74 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 13 Apr 2024 14:10:42 +0200 Subject: [PATCH] autodist-cgi: increase default size of build output and support for full output --- autodist-cgi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autodist-cgi b/autodist-cgi index a8d3fe2..7535cec 100755 --- a/autodist-cgi +++ b/autodist-cgi @@ -10,6 +10,7 @@ SHOWLOG=`echo "$QUERY_STRING" | sed -n 's/^.*SHOWLOG=\([^&]*\).*$/\1/p' | sed "s SHOWINDEX=`echo "$QUERY_STRING" | sed -n 's/^.*SHOWINDEX=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` LINES=`echo "$QUERY_STRING" | sed -n 's/^.*LINES=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` FORMAT=`echo "$QUERY_STRING" | sed -n 's/^.*FORMAT=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` +FULL=`echo "$QUERY_STRING" | sed -n 's/^.*FULL=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` function resolve_logname() { local l=$1 @@ -77,7 +78,7 @@ fi [ ! "$SHOWLOG" -a "$HOST" = "$AS_HOST" ] && echo "

Host: `hostname -s` (`uname -m`, kernel `uname -r`)

" if [ "$SHOWLOG" -a "$HOST" != "$AS_HOST" ]; then - curl "${AUTOPORT_CGI_HOST[$HOST]}?AS_HOST=$HOST&SHOWLOG=$SHOWLOG&NUM=$NUM&REP=$REP&LOG=$LOG" 2>/dev/null + curl "${AUTOPORT_CGI_HOST[$HOST]}?AS_HOST=$HOST&SHOWLOG=$SHOWLOG&NUM=$NUM&REP=$REP&LOG=$LOG&FULL=$FULL" 2>/dev/null else for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do @@ -176,12 +177,12 @@ _EOF LOGFILESIZE=`stat -c %s ${BUILDLOGDIR}${SHOWLOG}` LOGDATE=`stat -c %y ${BUILDLOGDIR}${SHOWLOG}` echo -n "${SHOWLOG} ($LOGDATE; $LOGFILESIZE):" - if [ $LOGFILESIZE -lt 131072 ]; then + if [ $LOGFILESIZE -lt 2097152 -o "$FULL" != "" ]; then cat ${BUILDLOGDIR}${SHOWLOG} | parse_build_output else - head -c 65535 ${BUILDLOGDIR}${SHOWLOG} | parse_build_output + head -c 1048576 ${BUILDLOGDIR}${SHOWLOG} | parse_build_output echo "
<------ CUT (long file) ------>" - tail -c 65535 ${BUILDLOGDIR}${SHOWLOG} | parse_build_output + tail -c 1048576 ${BUILDLOGDIR}${SHOWLOG} | parse_build_output fi fi fi