summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig>2005-08-15 13:05:18 +0000
committerrillig <rillig>2005-08-15 13:05:18 +0000
commit0c7469772c878f74471ef515950abc56ed63d89d (patch)
tree60932d9acb2a532c8d8d63f6a2f4df115e7ebe80 /mk
parent844a5adcdb4030491cf1965fd1b312d94b740a63 (diff)
downloadpkgsrc-0c7469772c878f74471ef515950abc56ed63d89d.tar.gz
In print-pkg-size-this, initialize s before summing up all file sizes. This
results in "0" being printed for empty packages, which had been "" before. Fixes PR 30955.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index bac790f4541..76ac0a59c42 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1714 2005/08/14 19:52:26 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1715 2005/08/15 13:05:18 rillig Exp $
#
# This file is in the public domain.
#
@@ -3973,7 +3973,7 @@ print-pkg-size-this:
| ${SORT} -u \
| ${SED} -e "s/'/'\\\\''/g" -e "s/.*/'&'/" \
| ${XARGS} -n 256 ${LS} -ld \
- | ${AWK} '{ s += $$5; } END { print s; }' \
+ | ${AWK} 'BEGIN { s = 0; } { s += $$5; } END { print s; }'
# Sizes of required pkgs (only)
#