webbuild: some small bugfixes
This commit is contained in:
parent
2674eed1f2
commit
8576dc1d8c
@ -70,8 +70,9 @@ function ajax_getvalues_refresh(request,user,user_email,secret) {
|
|||||||
"<span name=social sid=\""+ id + "\">" + nodes[i].childNodes[0].nodeValue + "</span>" +
|
"<span name=social sid=\""+ id + "\">" + nodes[i].childNodes[0].nodeValue + "</span>" +
|
||||||
document.getElementById("socialbox").innerHTML;
|
document.getElementById("socialbox").innerHTML;
|
||||||
}
|
}
|
||||||
if (xmldoc.getElementsByTagName("processes")[0] != undefined)
|
if (xmldoc.getElementsByTagName("processes")[0] != undefined) {
|
||||||
document.getElementById("processes").innerHTML = xmldoc.getElementsByTagName("processes")[0].childNodes[0].nodeValue;
|
document.getElementById("processes").innerHTML = xmldoc.getElementsByTagName("processes")[0].childNodes[0].nodeValue;
|
||||||
|
}
|
||||||
$(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); });
|
$(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); });
|
||||||
// lastupdate = (+new Date());
|
// lastupdate = (+new Date());
|
||||||
socialbox_refresh_times();
|
socialbox_refresh_times();
|
||||||
|
@ -222,15 +222,15 @@ if [ "$REQUEST" = "refresh" -o ! "$USER" ]; then
|
|||||||
else
|
else
|
||||||
USER_GRAVATAR=`echo -n $SEMAIL | md5sum | sed "s| .*||"`
|
USER_GRAVATAR=`echo -n $SEMAIL | md5sum | sed "s| .*||"`
|
||||||
fi
|
fi
|
||||||
echo -n "<add id=\"$SID\"><![CDATA[<div style=\"vertical-align:middle;position:relative;float:left;height:24px;width:24px;\">"
|
echo -n "<add id=\"$SID\"><![CDATA[<div style=\"margin:0;padding:0;\"><div style=\"vertical-align:middle;position:relative;float:left;height:24px;width:24px;margin-right:2px;\">"
|
||||||
echo -n "<img src=\"http://www.gravatar.com/avatar/$USER_GRAVATAR?s=24&d=http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=24\" /></div>"
|
echo -n "<img src=\"http://www.gravatar.com/avatar/$USER_GRAVATAR?s=24&d=http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=24\" /></div>"
|
||||||
if [ "$SPRIVACY" -a ! "$USER" ]; then
|
if [ "$SPRIVACY" -a ! "$USER" ]; then
|
||||||
SUSER="a developer"
|
SUSER="a developer"
|
||||||
elif [ "$USER" = "$SUSER" ]; then
|
elif [ "$USER" = "$SUSER" ]; then
|
||||||
SUSER="you"
|
SUSER="you"
|
||||||
fi
|
fi
|
||||||
echo -n "<div style=\"position:relative;float:right;height:auto;width:164px;\"><b>$SUSER</b> $STEXT <i><span name=socialtime time=$STIME></span></i></div><br>"
|
echo -n "<div style=\"position:relative;margin-left:24px;height:auto;padding:0;\"><b>$SUSER</b> $STEXT <i><span name=socialtime time=$STIME></span></i></div>"
|
||||||
echo -n "<div style=\"clear:both;\"><hr></div>]]></add>"
|
echo -n "</div><div style=\"clear:both;\"><hr></div>]]></add>"
|
||||||
count=`expr $count + 1`
|
count=`expr $count + 1`
|
||||||
done
|
done
|
||||||
echo -n "</socialbox>"
|
echo -n "</socialbox>"
|
||||||
@ -393,7 +393,7 @@ if [ "$REQUEST" = "repsearch" ]; then
|
|||||||
echo -n "<output><![CDATA["
|
echo -n "<output><![CDATA["
|
||||||
echo -n "<hr><b>Repository search results for \"$REPSEARCHTEXT\":</b><div align=left class=output id=outputtop>"
|
echo -n "<hr><b>Repository search results for \"$REPSEARCHTEXT\":</b><div align=left class=output id=outputtop>"
|
||||||
echo -n "<pre><!-- SCROLL -->"
|
echo -n "<pre><!-- SCROLL -->"
|
||||||
$SUDO_WRAPPER 0 local "$USER" "" "openmamba-repository search -i $REPSEARCHTEXT" | \
|
$SUDO_WRAPPER 0 local "$USER" "" "openmamba-repository search -i ${REPSEARCHTEXT/-/\-}" | \
|
||||||
parse_search_output ${AUTOPORT_ARCH[$ENVIRONMENT]}
|
parse_search_output ${AUTOPORT_ARCH[$ENVIRONMENT]}
|
||||||
# sed "s|\(.*(source).*\)|<font color=white><b>\1</b></font>|;
|
# sed "s|\(.*(source).*\)|<font color=white><b>\1</b></font>|;
|
||||||
# s|\(.*(${AUTOPORT_ARCH[$ENVIRONMENT]}).*\)|<font color=lightgreen>\1</font>|"
|
# s|\(.*(${AUTOPORT_ARCH[$ENVIRONMENT]}).*\)|<font color=lightgreen>\1</font>|"
|
||||||
@ -613,7 +613,9 @@ if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$MAINTAINERMODE" = "true" ]; then
|
|||||||
echo -n "<operations> </operations>"
|
echo -n "<operations> </operations>"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -n "<repositories><![CDATA[Review failed autobuilds:"
|
echo -n "<repositories><![CDATA[Review failed <a href=\"$AUTOBUILDS_STATUS_URL\" target=\"autobuilds\""
|
||||||
|
echo -n " title=\"Open autobuilds status page in a new window\">autobuilds</a>:"
|
||||||
|
|
||||||
# autobuild edit previous
|
# autobuild edit previous
|
||||||
echo -n "<input type=button name=autobuildeditprev value=\" < \" onclick="
|
echo -n "<input type=button name=autobuildeditprev value=\" < \" onclick="
|
||||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&"
|
||||||
@ -738,19 +740,22 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
|
|||||||
# SPECFILE creation
|
# SPECFILE creation
|
||||||
if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -a "$MAINTAINERMODE" != "true" ]; then
|
if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -a "$MAINTAINERMODE" != "true" ]; then
|
||||||
echo -n "<speccreate><![CDATA["
|
echo -n "<speccreate><![CDATA["
|
||||||
echo -n " Start from URL:<input type=text id=speccreateurl value=\"\" size=\"55\">"
|
echo -n " Start from URL:<input type=text id=speccreateurl value=\"\" size=\"50\">"
|
||||||
echo -n " name:<input type=text id=speccreatename value=\"\" size=\"10\">"
|
echo -n " name:<input type=text id=speccreatename value=\"\" size=\"10\">"
|
||||||
echo -n " type:<select id=speccreatetype>"
|
echo -n " type:<select id=speccreatetype>"
|
||||||
for t in standard gnome kde3 kde4 library perl python standard-daemon; do
|
for t in `ls /usr/share/autospec/templates`; do
|
||||||
echo -n "<option value=\"$t\">$t</option>"
|
[ "$t" = "library" ] && SELECTED="selected=selected" || SELECTED=
|
||||||
|
echo -n "<option value=\"$t\" $SELECTED>$t</option>"
|
||||||
done
|
done
|
||||||
echo -n "</select>"
|
echo -n "</select>"
|
||||||
echo -n " version:<input type=text id=speccreateversion value=\"\" size=\"6\">"
|
echo -n " version:<input type=text id=speccreateversion value=\"\" size=\"5\">"
|
||||||
|
echo -n " branch:<input type=text id=speccreategitbranch value=\"\" size=\"5\">"
|
||||||
echo -n "<input type=button id=speccreatebutton value=\"Create .spec\" onclick=ajax_getvalues(\""
|
echo -n "<input type=button id=speccreatebutton value=\"Create .spec\" onclick=ajax_getvalues(\""
|
||||||
echo -n "REQUEST=speccreate&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
echo -n "REQUEST=speccreate&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
||||||
echo -n "PACKAGE=\"+encodeURIComponent(getElementById('speccreatename').value)+\"&"
|
echo -n "PACKAGE=\"+encodeURIComponent(getElementById('speccreatename').value)+\"&"
|
||||||
echo -n "SPECCREATETYPE=\"+getElementById('speccreatetype').value+\"&"
|
echo -n "SPECCREATETYPE=\"+getElementById('speccreatetype').value+\"&"
|
||||||
echo -n "SPECCREATEVERSION=\"+getElementById('speccreateversion').value+\"&"
|
echo -n "SPECCREATEVERSION=\"+getElementById('speccreateversion').value+\"&"
|
||||||
|
echo -n "SPECCREATEGITBRANCH=\"+getElementById('speccreategitbranch').value+\"&"
|
||||||
echo -n "SPECCREATEURL=\"+encodeURIComponent(getElementById('speccreateurl').value));>"
|
echo -n "SPECCREATEURL=\"+encodeURIComponent(getElementById('speccreateurl').value));>"
|
||||||
echo "]]></speccreate>"
|
echo "]]></speccreate>"
|
||||||
elif [ "$MAINTAINERMODE" = "true" ]; then
|
elif [ "$MAINTAINERMODE" = "true" ]; then
|
||||||
@ -817,6 +822,7 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
|
|||||||
#DECODEDURL=`cgi_decodevar $SPECCREATEURL`
|
#DECODEDURL=`cgi_decodevar $SPECCREATEURL`
|
||||||
[ "$SPECCREATETYPE" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -t $SPECCREATETYPE"
|
[ "$SPECCREATETYPE" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -t $SPECCREATETYPE"
|
||||||
[ "$SPECCREATEVERSION" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -v $SPECCREATEVERSION"
|
[ "$SPECCREATEVERSION" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -v $SPECCREATEVERSION"
|
||||||
|
[ "$SPECCREATEGITBRANCH" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -v --git-branch $SPECCREATEGITBRANCH"
|
||||||
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "$AUTOSPEC_CMD -s \"$SPECCREATEURL\" $AUTOSPEC_CMDLINE --changelog \"package created by $USER using the webbuild interface\""
|
$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "$AUTOSPEC_CMD -s \"$SPECCREATEURL\" $AUTOSPEC_CMDLINE --changelog \"package created by $USER using the webbuild interface\""
|
||||||
RET=$?
|
RET=$?
|
||||||
[ $RET -eq 0 ] && {
|
[ $RET -eq 0 ] && {
|
||||||
@ -989,20 +995,30 @@ if [ "$MAINTAINERMODE" != "true" ]; then
|
|||||||
# destination repository select
|
# destination repository select
|
||||||
echo -n "<br>Send to:"
|
echo -n "<br>Send to:"
|
||||||
echo -n "<select id=sendrepository>"
|
echo -n "<select id=sendrepository>"
|
||||||
for f in `$SUDO_WRAPPER 0 local "$USER" "" "/usr/sbin/openmamba-repository list"`; do
|
if [ "$USER_ALLREPOSITORIES" ]; then
|
||||||
|
SEND_REPS=`$SUDO_WRAPPER 0 local "$USER" "" "/usr/sbin/openmamba-repository list"`
|
||||||
|
elif [ "$USER_CANMAINTAIN_REPOSITORIES" ]; then
|
||||||
|
SEND_REPS="$USER_CANMAINTAIN_REPOSITORIES";
|
||||||
|
for u in $USER_CANMAINTAIN_REPOSITORIES devel-$USER; do
|
||||||
|
[ "$u" = "$repname" ] && echo -n "<option value=\"$repname\" $SELECTED>$repname</option>"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
SEND_REPS="devel-contrib"
|
||||||
|
fi
|
||||||
|
for f in $SEND_REPS; do
|
||||||
repname=`basename $f`
|
repname=`basename $f`
|
||||||
if [ "$repname" = "devel-${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}" -o \
|
# if [ "$repname" = "devel-${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}" -o \
|
||||||
"$repname" = "${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" -o \
|
# "$repname" = "${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" -o \
|
||||||
"$repname" = "devel-$USER" -o \
|
# "$repname" = "devel-$USER" -o \
|
||||||
"$USER_ALLREPOSITORIES" ]; then
|
# "$USER_ALLREPOSITORIES" ]; then
|
||||||
SELECTED=
|
SELECTED=
|
||||||
if [ "$SENDREPOSITORY" = "$repname" ]; then
|
if [ "$SENDREPOSITORY" = "$repname" ]; then
|
||||||
SELECTED="selected=\"selected\"";
|
SELECTED="selected=\"selected\"";
|
||||||
elif [ ! "$SENDREPOSITORY" -a "${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" = "$repname" ]; then
|
elif [ ! "$SENDREPOSITORY" -a "${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" = "$repname" ]; then
|
||||||
SELECTED="selected=\"selected\"";
|
SELECTED="selected=\"selected\"";
|
||||||
fi
|
|
||||||
echo -n "<option value=\"$repname\" $SELECTED>$repname</option>"
|
|
||||||
fi
|
fi
|
||||||
|
echo -n "<option value=\"$repname\" $SELECTED>$repname</option>"
|
||||||
|
# fi
|
||||||
done
|
done
|
||||||
echo -n "</select><br>"
|
echo -n "</select><br>"
|
||||||
[ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$STATE_ADVANCEDCONTROLS" ] && echo -n "<hr><div style=\"background-color:#FFFFDE\"><b>Autodist batch builds:</b><br>"
|
[ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$STATE_ADVANCEDCONTROLS" ] && echo -n "<hr><div style=\"background-color:#FFFFDE\"><b>Autodist batch builds:</b><br>"
|
||||||
|
@ -34,6 +34,7 @@ function showlog() {
|
|||||||
LOGFILES="$LOGFILES $LOGDIR/$LOGFILE1 $LOGDIR/$LOGFILE2 $LOGDIR/$LOGFILE3 $LOGDIR/$LOGFILE4"
|
LOGFILES="$LOGFILES $LOGDIR/$LOGFILE1 $LOGDIR/$LOGFILE2 $LOGDIR/$LOGFILE3 $LOGDIR/$LOGFILE4"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
LOGFILES=`ls -t $LOGFILES | head -1`
|
||||||
fi
|
fi
|
||||||
echo -n "<output><![CDATA[<hr><b>Console output for $PACKAGE ($LOGTYPE$LOGSTATUSAPPEND):</b>"
|
echo -n "<output><![CDATA[<hr><b>Console output for $PACKAGE ($LOGTYPE$LOGSTATUSAPPEND):</b>"
|
||||||
echo "<div align=left class=output id=$LOGOUTPUTID>"
|
echo "<div align=left class=output id=$LOGOUTPUTID>"
|
||||||
|
@ -94,7 +94,7 @@ if [ "$MODE" = "specinfo" ]; then
|
|||||||
specvar="SPECVAR_${1/:*}"
|
specvar="SPECVAR_${1/:*}"
|
||||||
specvar="${specvar/[0-9]*}"
|
specvar="${specvar/[0-9]*}"
|
||||||
[ "$specvar" = "$lastspecvar" ] && varidx=`expr $varidx + 1` || varidx=0
|
[ "$specvar" = "$lastspecvar" ] && varidx=`expr $varidx + 1` || varidx=0
|
||||||
echo "$specvar[$varidx]=\"${line}\""
|
echo "$specvar[$varidx]=\"${line//\"/}\""
|
||||||
[ "$specvar" = "SPECVAR_Version" -a ! "$BUILDDIR" ] && BUILDDIR="$PACKAGE-${line}"
|
[ "$specvar" = "SPECVAR_Version" -a ! "$BUILDDIR" ] && BUILDDIR="$PACKAGE-${line}"
|
||||||
fi
|
fi
|
||||||
lastspecvar=$specvar
|
lastspecvar=$specvar
|
||||||
@ -114,7 +114,7 @@ if [ "$MODE" = "specinfo" ]; then
|
|||||||
fi
|
fi
|
||||||
echo "COMMAND: $COMMAND" >> $WEBBUILD_STATEDIR/commands_log
|
echo "COMMAND: $COMMAND" >> $WEBBUILD_STATEDIR/commands_log
|
||||||
|
|
||||||
cmdtmpfile=`mktemp --suffix=.webbuildcmd`
|
cmdtmpfile=`mktemp --tmpdir=$WEBBUILD_STATEDIR/tmp --suffix=.webbuildcmd`
|
||||||
|
|
||||||
[ "$PACKAGE" ] || PACKAGE=nopackage
|
[ "$PACKAGE" ] || PACKAGE=nopackage
|
||||||
if [ "$MODE" = "background" ]; then
|
if [ "$MODE" = "background" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user