autodist,webbuild: support for different update return codes in automatic updates logging
This commit is contained in:
parent
becb15708b
commit
24f394ce84
6
autodist
6
autodist
@ -548,7 +548,7 @@ function launch_pkgs_loop() {
|
|||||||
case $SEVERITY in
|
case $SEVERITY in
|
||||||
0) ;;
|
0) ;;
|
||||||
1) echo "!! Error: spec filename must be the same as package name or invalid job name; skipping $pkg package."
|
1) echo "!! Error: spec filename must be the same as package name or invalid job name; skipping $pkg package."
|
||||||
[ "$do_autobuild" ] && autobuild_log $pkg $operation failed $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
|
[ "$do_autobuild" ] && autobuild_log $pkg $operation 240 $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
|
||||||
continue ;;
|
continue ;;
|
||||||
*) echo "!! Error: spec filename must be the same as package name or invalid job name; aborting."
|
*) echo "!! Error: spec filename must be the same as package name or invalid job name; aborting."
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
@ -565,7 +565,7 @@ function launch_pkgs_loop() {
|
|||||||
case $SEVERITY in
|
case $SEVERITY in
|
||||||
0) ;;
|
0) ;;
|
||||||
1) echo "%! Error: could not apply patch to specfile; skipping $pkg package."
|
1) echo "%! Error: could not apply patch to specfile; skipping $pkg package."
|
||||||
[ "$do_autobuild" ] && autobuild_log $pkg $operation failed $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
|
[ "$do_autobuild" ] && autobuild_log $pkg $operation 241 $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
|
||||||
ret=1
|
ret=1
|
||||||
continue ;;
|
continue ;;
|
||||||
*) echo "!! Error: could not apply patch to specfile; aborting."
|
*) echo "!! Error: could not apply patch to specfile; aborting."
|
||||||
@ -756,7 +756,7 @@ function launch_pkgs_loop() {
|
|||||||
}
|
}
|
||||||
mv $LOGFILE_PKG $LOGDIR/failed/
|
mv $LOGFILE_PKG $LOGDIR/failed/
|
||||||
echo "?= See $LOGDIR/failed/${LOGFILE_PKG_NAME}"
|
echo "?= See $LOGDIR/failed/${LOGFILE_PKG_NAME}"
|
||||||
[ "$do_autobuild" ] && autobuild_log $pkg $operation failed $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
|
[ "$do_autobuild" ] && autobuild_log $pkg $operation $ret $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
|
||||||
case $operation in
|
case $operation in
|
||||||
autoupdate|update)
|
autoupdate|update)
|
||||||
;;
|
;;
|
||||||
|
24
autodist-cgi
24
autodist-cgi
@ -235,7 +235,7 @@ _EOF
|
|||||||
BUILDNOW[$BUILDNOWIDX]="$1"
|
BUILDNOW[$BUILDNOWIDX]="$1"
|
||||||
[ "$4" ] && BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} `echo $4 | sed "s|.*autodist/log/||"`"
|
[ "$4" ] && BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} `echo $4 | sed "s|.*autodist/log/||"`"
|
||||||
# BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $2/$3/$1.i586"
|
# BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $2/$3/$1.i586"
|
||||||
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
BUILDNOWSTATUS[$BUILDNOWIDX]=$3
|
||||||
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
||||||
done < $STATEFILE
|
done < $STATEFILE
|
||||||
else
|
else
|
||||||
@ -266,7 +266,7 @@ _EOF
|
|||||||
BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $CURRLOGFILE"
|
BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $CURRLOGFILE"
|
||||||
fi
|
fi
|
||||||
# BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $2/$3/$1.i586"
|
# BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $2/$3/$1.i586"
|
||||||
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
BUILDNOWSTATUS[$BUILDNOWIDX]=$3
|
||||||
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
||||||
done < $AUTODISTSTATEFILE
|
done < $AUTODISTSTATEFILE
|
||||||
for p in `dirname $LOGFILE`/current.*; do
|
for p in `dirname $LOGFILE`/current.*; do
|
||||||
@ -306,14 +306,25 @@ _EOF
|
|||||||
# echo
|
# echo
|
||||||
# rowcnt=0
|
# rowcnt=0
|
||||||
# fi
|
# fi
|
||||||
case $OPERATIONNAME-$OPERATIONSTATUS in
|
case $OPERATIONNAME-$OPERATIONSTATUS in
|
||||||
build-ok|send-ok|install-ok|retryinstall-ok)
|
build-ok|send-ok|install-ok|retryinstall-ok)
|
||||||
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\">$OPERATIONNAME:$OPERATIONSTATUS</a>"
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\">$OPERATIONNAME:$OPERATIONSTATUS</a>"
|
||||||
;;
|
;;
|
||||||
*-failed)
|
update-failed|autoupdate-failed)
|
||||||
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=red>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
if [ "${BUILDNOWSTATUS[$b]}" = "4" ]; then
|
||||||
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=green>$OPERATIONNAME:up-to-date</font></a>"
|
||||||
|
elif [ "${BUILDNOWSTATUS[$b]}" = "3" ]; then
|
||||||
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=darkgoldenrod>$OPERATIONNAME:unknown</font></a>"
|
||||||
|
elif [ "${BUILDNOWSTATUS[$b]}" = "2" ]; then
|
||||||
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=darkgoldenrod>$OPERATIONNAME:newer</font></a>"
|
||||||
|
else
|
||||||
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=red>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*) echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=black>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
*-ok) echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=black>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=red>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# [ "$SUBJOBNAME" != "$JOBNAME" ] && echo -en "(<a href=\"/distribution/webbuild.php?ENVIRONMENT=$i&PACKAGE=$SUBJOBNAME\" target=\"webbuild\">$SUBJOBNAME</a>)"
|
# [ "$SUBJOBNAME" != "$JOBNAME" ] && echo -en "(<a href=\"/distribution/webbuild.php?ENVIRONMENT=$i&PACKAGE=$SUBJOBNAME\" target=\"webbuild\">$SUBJOBNAME</a>)"
|
||||||
@ -324,7 +335,6 @@ _EOF
|
|||||||
if [[ $b -eq $BUILDNOWIDX-1 && ! "$ENDTIME" ]]; then
|
if [[ $b -eq $BUILDNOWIDX-1 && ! "$ENDTIME" ]]; then
|
||||||
echo -n "<font color=green>${BUILDOPERATION[$b]}(in progress...)</font>"
|
echo -n "<font color=green>${BUILDOPERATION[$b]}(in progress...)</font>"
|
||||||
fi
|
fi
|
||||||
[ "${BUILDNOWSTATUS[$b]}" ] && echo -n "<i>(${BUILDNOWSTATUS[$b]})</i>"
|
|
||||||
LASTJOBNAME=$JOBNAME
|
LASTJOBNAME=$JOBNAME
|
||||||
done
|
done
|
||||||
[ "$LASTJOBNAME" ] && echo
|
[ "$LASTJOBNAME" ] && echo
|
||||||
|
@ -672,7 +672,7 @@ else
|
|||||||
[ "$STATE_AUTODISTCURRENT" = "1" ] && AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-current || AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-last
|
[ "$STATE_AUTODISTCURRENT" = "1" ] && AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-current || AUTOUPDATEFILE=$BUILDLOGDIR/autoupdate-last
|
||||||
while read line; do
|
while read line; do
|
||||||
set -- $line
|
set -- $line
|
||||||
if [ "$3" = "failed" -a "$2" != "autoupdate" ]; then
|
if [ "$3" != "ok" ]; then
|
||||||
if [ "$REQUEST" != "skip" ]; then
|
if [ "$REQUEST" != "skip" ]; then
|
||||||
[ "$PACKAGE" = "$1" ] && SELECTED="selected=selected" || SELECTED=
|
[ "$PACKAGE" = "$1" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
else
|
else
|
||||||
@ -681,7 +681,13 @@ else
|
|||||||
NEXTLOGTYPE=$2
|
NEXTLOGTYPE=$2
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
echo -n "<option value=\"$1;$2\" $SELECTED>$1 ($2 $3)</option>"
|
# skip 'higher version' (2), 'cant' find update' (3)
|
||||||
|
# 'no updates available' (4) autospec return codes
|
||||||
|
if [ "$2-$3" != "update-2" -a "$2-$3" != "autoupdate-2" -a \
|
||||||
|
"$2-$3" != "update-3" -a "$2-$3" != "autoupdate-3" -a \
|
||||||
|
"$2-$3" != "update-4" -a "$2-$3" != "autoupdate-4" ]; then
|
||||||
|
echo -n "<option value=\"$1;$2\" $SELECTED>$1 ($2)</option>"
|
||||||
|
fi
|
||||||
if [ "$PACKAGE" = "$1" -a "$REQUEST" = "skip" ]; then
|
if [ "$PACKAGE" = "$1" -a "$REQUEST" = "skip" ]; then
|
||||||
SELECTED="selected=selected"
|
SELECTED="selected=selected"
|
||||||
else
|
else
|
||||||
@ -1296,7 +1302,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
|
||||||
echo -n "SENDREPOSITORY=\"+getSelectedValueById('sendrepository')"
|
echo -n "SENDREPOSITORY=\"+getSelectedValueById('sendrepository')"
|
||||||
echo -n ",\"`cgi_encodevar "Send <b>$PACKAGE</b> built packages to <b>"`\"+getSelectedValueById('sendrepository')+"
|
echo -n ",\"`cgi_encodevar "Send <b>$PACKAGE</b> built packages to <b>"`\"+getSelectedValueById('sendrepository')+"
|
||||||
echo -n "\"`cgi_encodevar "</b>?<br><br><font color=lightgreen>HINT: does summary look short and good?</font><br><b>${SPECVAR_Name[0]} - ${SPECVAR_Summary[0]}.</b>"`\""
|
echo -n "\"`cgi_encodevar "</b>?<br><br><font color=goldenrod>HINT: does summary look short and good?</font><br><b>${SPECVAR_Name[0]} - ${SPECVAR_Summary[0]}.</b>"`\""
|
||||||
echo -n "); class=redbutton $HREFADD>"
|
echo -n "); class=redbutton $HREFADD>"
|
||||||
# recreate and send SRPM
|
# recreate and send SRPM
|
||||||
if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then
|
if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then
|
||||||
|
@ -88,7 +88,7 @@ function cgi_get_POST_vars()
|
|||||||
cgi_get_POST_upload "${CONTENT_TYPE/*boundary=}"
|
cgi_get_POST_upload "${CONTENT_TYPE/*boundary=}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
[ "${CONTENT_TYPE}" != "application/x-www-form-urlencoded" ] && \
|
[ "${CONTENT_TYPE:0:33}" != "application/x-www-form-urlencoded" ] && \
|
||||||
echo "Warning: you should probably use MIME type "\
|
echo "Warning: you should probably use MIME type "\
|
||||||
"application/x-www-form-urlencoded instead of ${CONTENT_TYPE}!" 1>&2
|
"application/x-www-form-urlencoded instead of ${CONTENT_TYPE}!" 1>&2
|
||||||
# save POST variables (only first time this is called)
|
# save POST variables (only first time this is called)
|
||||||
|
@ -54,7 +54,7 @@ elif [ "${AUTOPORT_CHROOT[$ENVIRONMENT]}" ]; then
|
|||||||
SUCMDPREFIX="chroot $ENVPREFIX su -l ${AUTOPORT_CHROOT_USER[$ENVIRONMENT]} -c"
|
SUCMDPREFIX="chroot $ENVPREFIX su -l ${AUTOPORT_CHROOT_USER[$ENVIRONMENT]} -c"
|
||||||
[ "$TMPFILE" ] && {
|
[ "$TMPFILE" ] && {
|
||||||
cp $TMPFILE /var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/$TMPFILE
|
cp $TMPFILE /var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/$TMPFILE
|
||||||
chmod 755 /var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/$TMPFILE
|
chmod +r /var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/$TMPFILE
|
||||||
}
|
}
|
||||||
elif [ "${AUTOPORT_NATIVE[$ENVIRONMENT]}" ]; then
|
elif [ "${AUTOPORT_NATIVE[$ENVIRONMENT]}" ]; then
|
||||||
ENVPREFIX=
|
ENVPREFIX=
|
||||||
|
Loading…
Reference in New Issue
Block a user