webbuild: fixes to matching autodist jobs with package name and other small fixes
This commit is contained in:
parent
5f2e54f58a
commit
a191ef0eb3
@ -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: <b>${u/*: }</b> | Disk: <b>$f</b> | Now building: <b>$b</b> | "
|
||||
echo -n "Load: <b>${u/*: }</b> | Disk: <b>$f</b> | "
|
||||
[ "$b" ] && echo -n "Building now: <b>$b</b> | "
|
||||
[ "`ps cax|grep smart`" ] && echo "<b>Updating</b> | "
|
||||
if [ "$STATE_JOBSSHOWALL" != "1" ]; then
|
||||
echo "My jobs: [<a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=true\");>Show all jobs</a>]"
|
||||
echo "$USER's jobs: [<a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=true\");>Show all jobs</a>]"
|
||||
else
|
||||
echo "All jobs: [<a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=false\");>Only show my jobs</a>]"
|
||||
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 "<option value=\"$PACKAGEENCODED\" $SELECTED>$PACKAGE (defaults)</option>"
|
||||
fi
|
||||
echo -n "</select>"
|
||||
if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "$PACKAGE" ]; then
|
||||
if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE//[-]/_}" ]; then
|
||||
echo -n "<br><font color=red>You should use autodist for this package!</font>"
|
||||
fi
|
||||
if [ "$AUTODISTJOB" ]; then
|
||||
@ -2157,7 +2159,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then
|
||||
# -a "$f" != "$REPOSITORY"
|
||||
done
|
||||
else
|
||||
#[ "$f" != "$REPOSITORY" ] &&
|
||||
#[ "$f" != "$REPOSITORY" ] &&
|
||||
echo -n "<option value=\"$f\">$f</option>"
|
||||
fi
|
||||
done
|
||||
|
@ -254,14 +254,14 @@ function show_docs() {
|
||||
done
|
||||
echo -n "<br>"
|
||||
for f in $@; do
|
||||
echo -n "<a name=logfile-$f><p style=\"background-color:gray\"><b>File $f:</b></a><pre>"
|
||||
echo -n "<a name=logfile-$f></a><p><b>File $f:</b><pre>"
|
||||
ftype="`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && file $f"`"
|
||||
if [ "${ftype/text}" = "${ftype}" ]; then
|
||||
echo "<p>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 "</pre>"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user