summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-12-25 16:18:48 +0000
committerseb <seb@pkgsrc.org>2003-12-25 16:18:48 +0000
commitb260f08f84d57f760bc6fb364db1790b09385655 (patch)
tree3821cf8d4048ba9d700918b6142cff9a8286016e /mk
parenta9aef86263efa4c67c75dc77c333cdeedc334202 (diff)
downloadpkgsrc-b260f08f84d57f760bc6fb364db1790b09385655.tar.gz
print-pkg-size-this target:
- properly quote any filenames in ${PLIST} before feeding them to xargs. This allows latest textproc/docbook-xsl package to be registered with its correct size because it contains a file with a single quote in its name. XXX pkg_add does not like this filename anyway. - fix the awk script that parse ${PLIST} so pathname containing space (hence awk's NF > 1) are not removed from size calculation. Many thanks to atatat@ to remind me the proper way to quote a shell word.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 831365fd7dd..d767d40edce 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1327 2003/12/24 15:22:00 heinz Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1328 2003/12/25 16:18:48 seb Exp $
#
# This file is in the public domain.
#
@@ -4379,11 +4379,11 @@ print-pkg-size-this:
@${SHCOMMENT} "This pkg's files" ; \
${AWK} 'BEGIN { base = "${PREFIX}/" } \
/^@cwd/ { base = $$2 "/" } \
- /^@ignore/ { next } \
- NF == 1 { print base $$1 }' \
+ /^@/ { next } \
+ { print base $$0 }' \
<${PLIST} \
| ${SORT} -u \
- | ${SED} -e 's, ,\\ ,g' \
+ | ${SED} -e "s/'/'\\\\''/g" -e "s/.*/'&'/" \
| ${XARGS} ${LS} -ld \
| ${AWK} 'BEGIN { print("0 "); } \
{ print($$5, " + "); } \