From 5bbf2f8715d44a1e9b1ff947c284799d76d7ccd9 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 11 Jun 2022 11:03:08 +0200 Subject: [PATCH] webbuild-cgi: check for zero length cache files (disk full); add -b descriptive argument to patches --- webbuild/webbuild-cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index d0fac9c..01fc103 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -925,7 +925,7 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then echo "" 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 "
" echo -n "Recent packages in $REPOSITORY:
" 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 "
Patch$NEWPATCHNUM:        $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch
" echo -n "2) in %prep section after %setup:
" - echo -ne "
%patch$NEWPATCHNUM -p$l
" + echo -ne "
%patch$NEWPATCHNUM -p$l -b .${ADDPATCHNAME}
" RET=-1 } else