diff options
author | spz <spz> | 2010-03-12 20:19:15 +0000 |
---|---|---|
committer | spz <spz> | 2010-03-12 20:19:15 +0000 |
commit | 1db6ddf23f81cde4a159435c5f6f357c4639286a (patch) | |
tree | 8847c6923ada55829b1b4cc6332a56ad8affcd31 /mk | |
parent | d6423fd59fbc13a48055de14449c2782c710a53f (diff) | |
download | pkgsrc-1db6ddf23f81cde4a159435c5f6f357c4639286a.tar.gz |
update pkg_summary.bz2 files if existing (and the pkg_summary.gz gets updated)
Diffstat (limited to 'mk')
-rwxr-xr-x | mk/scripts/binpkg-cache | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mk/scripts/binpkg-cache b/mk/scripts/binpkg-cache index 3388d74e745..5fab4008066 100755 --- a/mk/scripts/binpkg-cache +++ b/mk/scripts/binpkg-cache @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: binpkg-cache,v 1.18 2010/02/27 12:00:54 spz Exp $ +# $NetBSD: binpkg-cache,v 1.19 2010/03/12 20:19:15 spz Exp $ # # Script for generating a cache file with information about # all binary packages contained in a directory. @@ -48,6 +48,7 @@ CMP=${CMP:-cmp} FIND=${FIND:-find} GREP=${GREP:-grep} GZIP_CMD=${GZIP_CMD:-gzip} +BZIP2=${BZIP2:-bzip2} PKG_INFO=${PKG_INFO:-pkg_info} PKG_SUFX=${PKG_SUFX:-.tgz} SED=${SED:-sed} @@ -263,6 +264,17 @@ process_binpkg_dir(){ echo "********** WARNING **********" return fi + # if it's there, update it, otherwise don't bother + if test -f ${d}/${summaryfile}.bz2 ; then + cat ${tmpd}/${summaryfile} | ${BZIP2} > ${d}/${summaryfile}.bz2 + if test $? -ne 0 ; then + echo "********** WARNING **********" + echo "${BZIP2} of ${tmpd}/${summaryfile} to ${d}/${summaryfile}.bz2 failed!" + echo "Perhaps you do not have write permissions to ${d}?" + echo "********** WARNING **********" + return + fi + fi fi fi |