webbuild-cgi: check for zero length cache files (disk full); add -b descriptive argument to patches

This commit is contained in:
Silvan Calarco 2022-06-11 11:03:08 +02:00
parent 5c9a10871d
commit 5bbf2f8715

View File

@ -925,7 +925,7 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
echo "<option value=\"\">-- Select a SRPM package --</option>"
SRPMBUTTONDISABLED="disabled=disabled"
if [ "$local_ftp" -a -e $local_ftp/$REPOSITORY ]; then
if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then
if [ ! -s $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY -o $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then
ls --color=none $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
fi
else
@ -1193,7 +1193,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then
echo -n "<div class=maintainer>"
echo -n "<b>Recent packages in $REPOSITORY:</b><br>"
if [ "$local_ftp" -a -e $local_ftp/distromatic/$REPOSITORY ]; then
if [ $local_ftp/distromatic/$REPOSITORY/_recent.inc -nt $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY ]; then
if [ ! -s $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY -o $local_ftp/distromatic/$REPOSITORY/_recent.inc -nt $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY ]; then
cat $local_ftp/distromatic/$REPOSITORY/_recent.inc > $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY
cat $local_ftp/$REPOSITORY/distromatic.log > $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY
fi
@ -1903,7 +1903,7 @@ $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOS
fi
echo -ne "<br><pre>Patch$NEWPATCHNUM: $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch</pre>"
echo -n "<font color=gold>2) in %prep section after %setup:</font><br>"
echo -ne "<br><pre>%patch$NEWPATCHNUM -p$l</pre>"
echo -ne "<br><pre>%patch$NEWPATCHNUM -p$l -b .${ADDPATCHNAME}</pre>"
RET=-1
}
else