diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi
index 0c0d7a4..7be0950 100755
--- a/webbuild/webbuild-cgi
+++ b/webbuild/webbuild-cgi
@@ -15,7 +15,6 @@ cgi_getvars BOTH ALL
#cgi_getvars POST
if [ "$REQUEST" != "refresh" ]; then
-# echo "`date` - $QUERY_STRING_POST" >> $LOG
echo "`date` - USER=$USER&REQUEST=$REQUEST&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&MAINTAINERMODE=$MAINTAINERMODE" >> $LOG
fi
@@ -340,10 +339,13 @@ if [ "$REQUEST" = "killtree" ]; then
killline=`grep "^$KILLPID " $WEBBUILD_STATEDIR/processes`
if [ "$killline" ]; then
if [ $KILLPID -ge 1 ]; then
- [ -e /proc/$KILLPID ] && $SUDO_WRAPPER killtree $KILLPID "$USER"
- set -- $killline
- rm -f $5
- sed -i "/^$KILLPID /d" $WEBBUILD_STATEDIR/processes
+ if [ -e /proc/$KILLPID ]; then
+ $SUDO_WRAPPER killtree $KILLPID "$USER"
+ else
+ set -- $killline
+ rm -f $5
+ sed -i "/^$KILLPID /d" $WEBBUILD_STATEDIR/processes
+ fi
else
echo ""
fi
@@ -379,6 +381,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
while read line; do
set -- $line
RETCODE=$6
+ PROCESSLOG=$5
# if [ -e /proc/$1 -o $5 -lt 256 ]; then
numprocess=$(($numprocess + 1))
cmdline=`echo $line | sed "s|$1 $2 $3 $4 $5 $RETCODE ||"`
@@ -398,7 +401,14 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
[ "$STATE_JOBSSHOWALL" = "1" -o "$USER" = "$2" ] || continue
if [ $RETCODE -eq 256 -a -e /proc/$1 ]; then
echo -n ""
+ elif [ ! -e $PROCESSLOG ]; then
+ sed -i "/$1 $USER.* $PROCESSLOG /d" $WEBBUILD_STATEDIR/processes
+ continue
else
+ if [ $RETCODE -eq 256 ]; then
+ $SUDO_WRAPPER finishprocess $1 "$USER" $5
+ RETCODE=$?
+ fi
if [ $RETCODE -eq 0 ]; then
# echo -n "OK"
echo -n ""
@@ -416,10 +426,6 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
echo -n "\""
echo -n "$cmdline\" (`date -r $5 +\"%F %T\"`)"
- if [ $RETCODE -eq 256 ]; then
- $SUDO_WRAPPER finishprocess $1 "$USER" $5
- RETCODE=$?
- fi
fi
if [ "$2" = "$USER" -o "$USER_ADMIN" ]; then
if [ $RETCODE -eq 256 -a -e /proc/$1 ]; then
@@ -2131,7 +2137,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then
IMPORT_REPOSITORIES="$AUTOPORT_DEVEL_IMPORT_REPOSITORIES devel-$USER $AUTOPORT_DEVEL_RELEASE_REPOSITORIES"
fi
for f in $IMPORT_REPOSITORIES; do
- [ "$f" = "$REPOSITORY" ] && continue
+# [ "$f" = "$REPOSITORY" ] && continue
if [ ! "$USER_ALLREPOSITORIES" ]; then
for u in $USER_CANMAINTAIN_REPOSITORIES devel-$USER; do
[ "$u" = "$f" ] && echo -n ""