pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/scripts When using find to search for the "All" dir...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2c2d6cdaa809
branches: trunk
changeset: 513949:2c2d6cdaa809
user: dmcmahill <dmcmahill%pkgsrc.org@localhost>
date: Tue Jun 06 11:10:31 2006 +0000
description:
When using find to search for the "All" directories containing binary
packages, use -follow. Hopefully this will pick up all of the binary
packages again after the ftp.netbsd.org reorganization.
diffstat:
mk/scripts/binpkg-cache | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r 9eb6f392eed0 -r 2c2d6cdaa809 mk/scripts/binpkg-cache
--- a/mk/scripts/binpkg-cache Tue Jun 06 10:26:46 2006 +0000
+++ b/mk/scripts/binpkg-cache Tue Jun 06 11:10:31 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: binpkg-cache,v 1.7 2006/01/05 22:19:42 dmcmahill Exp $
+# $NetBSD: binpkg-cache,v 1.8 2006/06/06 11:10:31 dmcmahill Exp $
#
# Script for generating a cache file with information about
# all binary packages contained in a directory.
@@ -54,7 +54,7 @@
STAT=${STAT:-stat}
cachefile=.pkgcache
-cacheversion=20050428
+cacheversion=20060203
prompt="----> "
tab=" "
@@ -210,7 +210,15 @@
if test "X${DEBUG}" = "Xyes" ; then
echo "${PKG_INFO} -q -B ${f}"
fi
- ${PKG_INFO} -q -B ${f} >> ${tmpd}/${cachefile}
+ # The output of pkg_info contains the dependency information first
+ # (from the -n) followed by all the build definitions (-B).
+ # To make the dependency information easier to parse later, we
+ # want to prefix it with DEPENDS+=. Right now the only way I see
+ # to figure out when the DEPENDS section ends in the pkg_info output
+ # is by looking for a blank line.
+ ${PKG_INFO} -q -Bn ${f} | \
+ ${AWK} '/^$/ {x=1; print; next;} x==0 {printf("DEPENDS+=");} {print}' \
+ >> ${tmpd}/${cachefile}
echo "pkgcache_end ${fn}" >> ${tmpd}/${cachefile}
done
mv -f ${tmpd}/${cachefile} ${d}/${cachefile}
@@ -305,6 +313,7 @@
# Version
-V|--version)
${AWK} '/^#[ \t]*\$NetBSD/ {gsub(/,v/,"",$3);printf("%s: Version %s, %s\n",$3,$4,$5); exit 0;}' $prog
+ echo "Generating version ${cacheversion} of the cache files."
exit 0
;;
@@ -339,7 +348,7 @@
# put a trailing / after ${PACKAGES} in case ${PACKAGES} is
# a link.
-for d in `${FIND} ${PACKAGES}/ -type d -print` ; do
+for d in `${FIND} ${PACKAGES}/ -type d -follow -print` ; do
if test "X${DEBUG}" = "Xyes" ; then
echo "${prompt}Processing directory ${d}"
fi
Home |
Main Index |
Thread Index |
Old Index