From 8576dc1d8cdfaba76ba3618d35d11da3032fe781 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 22 Apr 2013 12:33:50 +0200 Subject: [PATCH] webbuild: some small bugfixes --- webbuild/html/scripts/socialbox.js | 3 +- webbuild/webbuild-cgi | 58 ++++++++++++++++++----------- webbuild/webbuild-functions-private | 1 + webbuild/webbuild-sudo | 4 +- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/webbuild/html/scripts/socialbox.js b/webbuild/html/scripts/socialbox.js index a752941..483e052 100644 --- a/webbuild/html/scripts/socialbox.js +++ b/webbuild/html/scripts/socialbox.js @@ -70,8 +70,9 @@ function ajax_getvalues_refresh(request,user,user_email,secret) { "" + nodes[i].childNodes[0].nodeValue + "" + 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; + } $(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); }); // lastupdate = (+new Date()); socialbox_refresh_times(); diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 041bc93..78babc3 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -222,15 +222,15 @@ if [ "$REQUEST" = "refresh" -o ! "$USER" ]; then else USER_GRAVATAR=`echo -n $SEMAIL | md5sum | sed "s| .*||"` fi - echo -n "" + echo -n "
" echo -n "
" if [ "$SPRIVACY" -a ! "$USER" ]; then SUSER="a developer" elif [ "$USER" = "$SUSER" ]; then SUSER="you" fi - echo -n "
$SUSER $STEXT

" - echo -n "

]]>
" + echo -n "
$SUSER $STEXT
" + echo -n "

]]>
" count=`expr $count + 1` done echo -n "" @@ -393,7 +393,7 @@ if [ "$REQUEST" = "repsearch" ]; then echo -n "Repository search results for \"$REPSEARCHTEXT\":
" echo -n "
"
-   $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]}
 #      sed "s|\(.*(source).*\)|\1|;
 #           s|\(.*(${AUTOPORT_ARCH[$ENVIRONMENT]}).*\)|\1|"
@@ -613,7 +613,9 @@ if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$MAINTAINERMODE" = "true" ]; then
       echo -n " "
    fi
 else
-   echo -n "autobuilds:"
+
    # autobuild edit previous
    echo -n ""
+      echo -n " Start from URL:"
       echo -n " name:"
       echo -n " type:"
-      echo -n " version:"
+      echo -n " version:"
+      echo -n " branch:"
       echo -n ""
       echo "]]>"
    elif [ "$MAINTAINERMODE" = "true" ]; then
@@ -817,6 +822,7 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
                        #DECODEDURL=`cgi_decodevar $SPECCREATEURL`
                        [ "$SPECCREATETYPE" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -t $SPECCREATETYPE"
                        [ "$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\""
                        RET=$?
                        [ $RET -eq 0 ] && {
@@ -989,20 +995,30 @@ if [ "$MAINTAINERMODE" != "true" ]; then
    # destination repository select
    echo -n "
Send to:" echo -n "
" [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$STATE_ADVANCEDCONTROLS" ] && echo -n "
Autodist batch builds:
" diff --git a/webbuild/webbuild-functions-private b/webbuild/webbuild-functions-private index 93e1570..ca20f63 100644 --- a/webbuild/webbuild-functions-private +++ b/webbuild/webbuild-functions-private @@ -34,6 +34,7 @@ function showlog() { LOGFILES="$LOGFILES $LOGDIR/$LOGFILE1 $LOGDIR/$LOGFILE2 $LOGDIR/$LOGFILE3 $LOGDIR/$LOGFILE4" fi done + LOGFILES=`ls -t $LOGFILES | head -1` fi echo -n "Console output for $PACKAGE ($LOGTYPE$LOGSTATUSAPPEND):" echo "
" diff --git a/webbuild/webbuild-sudo b/webbuild/webbuild-sudo index 8ac110d..3380317 100755 --- a/webbuild/webbuild-sudo +++ b/webbuild/webbuild-sudo @@ -94,7 +94,7 @@ if [ "$MODE" = "specinfo" ]; then specvar="SPECVAR_${1/:*}" specvar="${specvar/[0-9]*}" [ "$specvar" = "$lastspecvar" ] && varidx=`expr $varidx + 1` || varidx=0 - echo "$specvar[$varidx]=\"${line}\"" + echo "$specvar[$varidx]=\"${line//\"/}\"" [ "$specvar" = "SPECVAR_Version" -a ! "$BUILDDIR" ] && BUILDDIR="$PACKAGE-${line}" fi lastspecvar=$specvar @@ -114,7 +114,7 @@ if [ "$MODE" = "specinfo" ]; then fi echo "COMMAND: $COMMAND" >> $WEBBUILD_STATEDIR/commands_log -cmdtmpfile=`mktemp --suffix=.webbuildcmd` +cmdtmpfile=`mktemp --tmpdir=$WEBBUILD_STATEDIR/tmp --suffix=.webbuildcmd` [ "$PACKAGE" ] || PACKAGE=nopackage if [ "$MODE" = "background" ]; then