pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/flavor/pkg As the pkglint warning says, the pipe op...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/74a3bed212ad
branches:  trunk
changeset: 521892:74a3bed212ad
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Nov 26 11:51:30 2006 +0000

description:
As the pkglint warning says, the pipe operator discards the exit status of
its left hand side. Fixed that by using temporary files.

diffstat:

 mk/flavor/pkg/depends.mk |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r 4323133ed296 -r 74a3bed212ad mk/flavor/pkg/depends.mk
--- a/mk/flavor/pkg/depends.mk  Sun Nov 26 11:46:41 2006 +0000
+++ b/mk/flavor/pkg/depends.mk  Sun Nov 26 11:51:30 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: depends.mk,v 1.14 2006/10/09 08:57:39 joerg Exp $
+# $NetBSD: depends.mk,v 1.15 2006/11/26 11:51:30 rillig Exp $
 
 _DEPENDS_FILE=         ${WRKDIR}/.depends
 _REDUCE_DEPENDS_CMD=   ${SETENV} CAT=${CAT:Q}                          \
@@ -41,9 +41,10 @@
        ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${_DEPENDS_FILE} ${_COOKIE.depends}
 
 ${_DEPENDS_FILE}:
-       ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
-       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
-       ${_REDUCE_DEPENDS_CMD} ${BUILD_DEPENDS:Q} |                     \
+       ${RUN} ${MKDIR} ${.TARGET:H}
+       ${RUN} ${_REDUCE_DEPENDS_CMD} ${BUILD_DEPENDS:Q} > ${.TARGET}.tmp
+       ${RUN}                                                          \
+       exec 0< ${.TARGET}.tmp;                                         \
        while read dep; do                                              \
                pattern=`${ECHO} $$dep | ${SED} -e "s,:.*,,"`;          \
                dir=`${ECHO} $$dep | ${SED} -e "s,.*:,,"`;              \
@@ -51,8 +52,9 @@
                ${TEST} -n "$$dir" || exit 1;                           \
                ${ECHO} "build  $$pattern       $$dir";                 \
        done >> ${.TARGET}
-       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
-       ${_REDUCE_DEPENDS_CMD} ${DEPENDS:Q} |                           \
+       ${RUN} ${_REDUCE_DEPENDS_CMD} ${DEPENDS:Q} > ${.TARGET}.tmp     \
+       ${RUN}                                                          \
+       exec 0< ${.TARGET}.tmp;                                         \
        while read dep; do                                              \
                pattern=`${ECHO} $$dep | ${SED} -e "s,:.*,,"`;          \
                dir=`${ECHO} $$dep | ${SED} -e "s,.*:,,"`;              \



Home | Main Index | Thread Index | Old Index