summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2010-03-12 20:19:15 +0000
committerspz <spz@pkgsrc.org>2010-03-12 20:19:15 +0000
commit8df013cd6fc08441dc9c0f5b087311df7d131e11 (patch)
tree8847c6923ada55829b1b4cc6332a56ad8affcd31
parent136407be0be3190aa79c9d93bc41ef365ea73405 (diff)
downloadpkgsrc-8df013cd6fc08441dc9c0f5b087311df7d131e11.tar.gz
update pkg_summary.bz2 files if existing (and the pkg_summary.gz gets updated)
-rwxr-xr-xmk/scripts/binpkg-cache14
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