diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index dd9e9c7..15311b3 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -208,9 +208,9 @@ if [ "$REQUEST" = "refresh" -o ! "$USER" ]; then count=0 if [ ! "$FROMID" -o "$FROMID" = "0" -o "$FROMID" = "NaN" ]; then if [ "$USER" ]; then - line=`tac $WEBBUILD_STATEDIR/social_log 2>/dev/null | grep -v " SUSER=$USER " 2>/dev/null | head -n 25 | tail -n 1` + line=`tail -n 500 $WEBBUILD_STATEDIR/social_log | grep -v " SUSER=$USER " 2>/dev/null | tail -n 25 | head -n 1` else - line=`tac $WEBBUILD_STATEDIR/social_log 2>/dev/null | grep -v " STARGET=developers " 2>/dev/null | head -n 25 | tail -n 1` + line=`tail -n 500 $WEBBUILD_STATEDIR/social_log | grep -v " STARGET=developers " 2>/dev/null | tail -n 25 | head -n 1` fi eval $line FROMID=$SID @@ -240,7 +240,7 @@ if [ "$REQUEST" = "refresh" -o ! "$USER" ]; then fi echo -n "
Patch$NEWPATCHNUM: $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch\n\n%patch$NEWPATCHNUM -p1" + echo -n "
Patch$NEWPATCHNUM: $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch" + echo -n "2) in %prep section after %setup:
%patch$NEWPATCHNUM -p1" RET=-1 } else diff --git a/webbuild/webbuild-functions b/webbuild/webbuild-functions index 8b7c76e..e655e04 100644 --- a/webbuild/webbuild-functions +++ b/webbuild/webbuild-functions @@ -33,7 +33,7 @@ function social_log() { if [ ! "$STATE_FAKEUSER" ]; then STATE_SOCIALLOG_ID=0 . $WEBBUILD_STATEDIR/users/webbuild.state - STATE_SOCIALLOG_ID=`expr $STATE_SOCIALLOG_ID + 1` + STATE_SOCIALLOG_ID=$(($STATE_SOCIALLOG_ID + 1)) set_user_state_var STATE_SOCIALLOG_ID $STATE_SOCIALLOG_ID webbuild echo "SID=$STATE_SOCIALLOG_ID SPRIVACY=$STATE_PRIVACYMODE $line" >> $WEBBUILD_STATEDIR/social_log fi diff --git a/webbuild/webbuild-sudo b/webbuild/webbuild-sudo index fb586d7..d2f1666 100755 --- a/webbuild/webbuild-sudo +++ b/webbuild/webbuild-sudo @@ -94,10 +94,12 @@ if [ "$MODE" = "specinfo" ]; then [ "$1" = "%package" -o "$1" = "%description" ] && break if [[ "$1" =~ ^[a-zA-Z]*[0-9]*:.* ]]; then line="$(echo ${line/$1})" - specvar="SPECVAR_${1/:*}" - specvar="${specvar/[0-9]*}" - [ "$specvar" = "$lastspecvar" ] && varidx=`expr $varidx + 1` || varidx=0 + specvarfull="SPECVAR_${1/:*}" + specvar="${specvarfull/[0-9]*}" + specvaridx="${specvarfull/$specvar}" + [ "$specvar" = "$lastspecvar" ] && varidx=$(($varidx + 1)) || varidx=0 echo "$specvar[$varidx]=\"${line//\"/}\"" + [ "$specvaridx" != "" ] && echo "${specvar}_idx[$varidx]=$specvaridx" [ "$specvar" = "SPECVAR_Version" -a ! "$BUILDDIR" ] && BUILDDIR="$PACKAGE-${line}" fi lastspecvar=$specvar