pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/flavor/pkg Compute +SIZE_ALL as documented in pkg_i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7748e799de83
branches:  trunk
changeset: 562285:7748e799de83
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Jul 24 06:54:37 2009 +0000

description:
Compute +SIZE_ALL as documented in pkg_info(1). Addresses PR 41767.

diffstat:

 mk/flavor/pkg/metadata.mk |  41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diffs (62 lines):

diff -r 836f32590dd1 -r 7748e799de83 mk/flavor/pkg/metadata.mk
--- a/mk/flavor/pkg/metadata.mk Fri Jul 24 06:39:29 2009 +0000
+++ b/mk/flavor/pkg/metadata.mk Fri Jul 24 06:54:37 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.31 2009/05/02 16:14:37 reed Exp $
+# $NetBSD: metadata.mk,v 1.32 2009/07/24 06:54:37 joerg Exp $
 
 ######################################################################
 ### The targets below are all PRIVATE.
@@ -267,24 +267,6 @@
 
 ######################################################################
 ###
-### +SIZE_ALL - Package size-of-dependencies file
-###
-### This is the total size of the dependencies that this package was
-### built against.
-###
-_SIZE_ALL_FILE=                ${PKG_DB_TMPDIR}/+SIZE_ALL
-_METADATA_TARGETS+=    ${_SIZE_ALL_FILE}
-
-${_SIZE_ALL_FILE}: ${_RDEPENDS_FILE}
-       ${RUN}${MKDIR} ${.TARGET:H}
-       ${RUN}                                                          \
-       ${_FULL_DEPENDS_CMD} | ${SORT} -u |                             \
-       ${XARGS} -n 256 ${PKG_INFO} -qs |                               \
-       ${AWK} 'BEGIN { s = 0 } /^[0-9]+$$/ { s += $$1 } END { print s }' \
-               > ${.TARGET}
-
-######################################################################
-###
 ### +SIZE_PKG - Package size file
 ###
 ### This is the total size of the files contained in the package.
@@ -308,6 +290,27 @@
 
 ######################################################################
 ###
+### +SIZE_ALL - Package size-of-dependencies file
+###
+### This is the total size of the dependencies that this package was
+### built against and the package itself.
+###
+_SIZE_ALL_FILE=                ${PKG_DB_TMPDIR}/+SIZE_ALL
+_METADATA_TARGETS+=    ${_SIZE_ALL_FILE}
+
+${_SIZE_ALL_FILE}: ${_RDEPENDS_FILE} ${_SIZE_PKG_FILE}
+       ${RUN}${MKDIR} ${.TARGET:H}
+       ${RUN}                                                          \
+       {                                                               \
+               ${CAT} ${_SIZE_PKG_FILE} &&                             \
+               ${_FULL_DEPENDS_CMD} | ${SORT} -u |                     \
+               ${XARGS} -n 256 ${PKG_INFO} -qs;                        \
+       } |                                                             \
+       ${AWK} 'BEGIN { s = 0 } /^[0-9]+$$/ { s += $$1 } END { print s }' \
+               > ${.TARGET}
+
+######################################################################
+###
 ### +CONTENTS - Package manifest file
 ###
 ### This file contains the list of files and checksums, along with



Home | Main Index | Thread Index | Old Index