diff options
author | spz <spz@pkgsrc.org> | 2010-02-27 12:00:54 +0000 |
---|---|---|
committer | spz <spz@pkgsrc.org> | 2010-02-27 12:00:54 +0000 |
commit | 668fbae82e5dffb611be6ea2e12c1cd9af54df80 (patch) | |
tree | c4f935129c50146f6563cff4ffd84316aa2aa7b0 /mk | |
parent | 9df844a72e6d0b6dae033b621d71d2b6564df6ff (diff) | |
download | pkgsrc-668fbae82e5dffb611be6ea2e12c1cd9af54df80.tar.gz |
delete the summary and cache files in case the dir is writeable, but the
file isn't (as suggested by bouyer@)
fix typo in output message
Diffstat (limited to 'mk')
-rwxr-xr-x | mk/scripts/binpkg-cache | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/scripts/binpkg-cache b/mk/scripts/binpkg-cache index cfdb37f3a92..3388d74e745 100755 --- a/mk/scripts/binpkg-cache +++ b/mk/scripts/binpkg-cache @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: binpkg-cache,v 1.17 2007/10/13 17:46:12 rillig Exp $ +# $NetBSD: binpkg-cache,v 1.18 2010/02/27 12:00:54 spz Exp $ # # Script for generating a cache file with information about # all binary packages contained in a directory. @@ -206,7 +206,7 @@ process_binpkg_dir(){ need_update=yes fi if test "${build_summary}" = "yes" -a ${d}/${summaryfile}.gz -ot ${d}/${cachefile} ; then - echo "${tab}Summary file ${d}/${summaryfile}.gz is out of date and will be regnerated." + echo "${tab}Summary file ${d}/${summaryfile}.gz is out of date and will be regenerated." need_update=yes fi @@ -238,6 +238,9 @@ process_binpkg_dir(){ fi echo "pkgcache_end ${fn}" >> ${tmpd}/${cachefile} done + if test -f ${d}/${cachefile} ; then + rm -f ${d}/${cachefile} + fi mv -f ${tmpd}/${cachefile} ${d}/${cachefile} if test $? -ne 0 ; then echo "********** WARNING **********" @@ -249,6 +252,9 @@ process_binpkg_dir(){ fi if test "${build_summary}" = "yes" ; then + if test -f ${d}/${summaryfile}.gz ; then + rm -f ${d}/${summaryfile}.gz + fi cat ${tmpd}/${summaryfile} | ${GZIP_CMD} > ${d}/${summaryfile}.gz if test $? -ne 0 ; then echo "********** WARNING **********" |