autodist-cgi: increase default size of build output and support for full output
This commit is contained in:
parent
cebe696e6e
commit
5e4081a335
@ -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 "<h2>Host: `hostname -s` (`uname -m`, kernel `uname -r`)</h2>"
|
||||
|
||||
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 "<b>${SHOWLOG} ($LOGDATE; $LOGFILESIZE):</b>"
|
||||
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 "<br><font style=\"background-color:yellow;color:black\"><------ CUT (long file) ------></font>"
|
||||
tail -c 65535 ${BUILDLOGDIR}${SHOWLOG} | parse_build_output
|
||||
tail -c 1048576 ${BUILDLOGDIR}${SHOWLOG} | parse_build_output
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user