diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 28cde90..5d74674 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -397,9 +397,11 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then u="$(uptime)" f="$(df / -k -h --output=avail,pcent|tail -n1)" b=`ps ax|grep "rpmbuild .*\.spec$"|while read l; do basename "${l/.spec}"; done` - echo -n "Load: ${u/*: } | Disk: $f | Now building: $b | " + echo -n "Load: ${u/*: } | Disk: $f | " + [ "$b" ] && echo -n "Building now: $b | " + [ "`ps cax|grep smart`" ] && echo "Updating | " if [ "$STATE_JOBSSHOWALL" != "1" ]; then - echo "My jobs: [Show all jobs]" + echo "$USER's jobs: [Show all jobs]" else echo "All jobs: [Only show my jobs]" fi @@ -1198,7 +1200,7 @@ fi if [ "$PACKAGE" ]; then [ "$AUTODISTJOB" ] || AUTODISTJOB=${PACKAGE/\/*} - AUTODISTJOB="${AUTODISTJOB/-/_}" + AUTODISTJOB="${AUTODISTJOB//[-]/_}" PACKAGE=${PACKAGE/*\/} eval `$SUDO_WRAPPER specinfo $ENVIRONMENT "$USER" $PACKAGE ""` [ $? -eq 0 ] && SPECAVAILABLE=1 @@ -1339,10 +1341,10 @@ if [ "$MAINTAINERMODE" != "true" ]; then if [ "$AUTODISTJOB" -a "$AUTODISTJOB" = "$f" ]; then SELECTED="selected=\"selected\"" AUTODISTJOBSELECTED=1 - elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOB" ]; then + elif [ "${PACKAGE}" = "$f" -a ! "$AUTODISTJOB" ]; then # elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOBSELECTED" -a "$REQUEST" != "autodistjobchange" ]; then SELECTED="selected=\"selected\"" - AUTODISTJOB=$f + AUTODISTJOB=${f//[-]/_} AUTODISTJOBSELECTED=1 fi JOBENCODED=`cgi_encodevar $f` @@ -1354,7 +1356,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then echo -n "" fi echo -n "" - if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "$PACKAGE" ]; then + if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE//[-]/_}" ]; then echo -n "
You should use autodist for this package!" fi if [ "$AUTODISTJOB" ]; then @@ -2157,7 +2159,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then # -a "$f" != "$REPOSITORY" done else - #[ "$f" != "$REPOSITORY" ] && + #[ "$f" != "$REPOSITORY" ] && echo -n "" fi done diff --git a/webbuild/webbuild-functions-private b/webbuild/webbuild-functions-private index 1a1cbe3..104d42d 100644 --- a/webbuild/webbuild-functions-private +++ b/webbuild/webbuild-functions-private @@ -254,14 +254,14 @@ function show_docs() { done echo -n "
" for f in $@; do - echo -n "

File $f:

"
+      echo -n "

File $f:

"
       ftype="`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && file $f"`"
       if [ "${ftype/text}" = "${ftype}" ]; then
          echo "

Binary file; skipping." continue fi $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE \ - "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && head -c 10240 $f | sed \"s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g\"" | parse_generic_output + "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && head -c 10240 $f | strings | sed \"s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g\"" | parse_generic_output RET=$? echo -n "

" done