pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Do not run xargs if its input is an empty string; x...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bc53044d069d
branches:  trunk
changeset: 479042:bc53044d069d
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Wed Aug 04 06:22:39 2004 +0000

description:
Do not run xargs if its input is an empty string; xargs in Interix
executes the utility even in such a case.  Based on the patch provided
by Hiramatsu Yoshifumi in PR pkg/25777.

diffstat:

 mk/bsd.pkg.mk |  23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diffs (37 lines):

diff -r bdc721267296 -r bc53044d069d mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Wed Aug 04 06:22:25 2004 +0000
+++ b/mk/bsd.pkg.mk     Wed Aug 04 06:22:39 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1482 2004/08/04 02:56:01 jschauma Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1483 2004/08/04 06:22:39 minskim Exp $
 #
 # This file is in the public domain.
 #
@@ -4342,14 +4342,19 @@
 # dependencies are all installed.
 .PHONY: print-pkg-size-depends
 print-pkg-size-depends:
-       @${MAKE} ${MAKEFLAGS} run-depends-list                          \
-       | ${XARGS} -n 1 ${SETENV} ${PKG_BEST_EXISTS}                    \
-       | ${SORT} -u                                                    \
-       | ${XARGS} -n 256 ${SETENV} ${PKG_INFO} -qs                     \
-       | ${AWK} -- 'BEGIN { print("0 "); }                             \
-               /^[0-9]+$$/ { print($$1, " + "); }                      \
-               END { print("p"); }'                                    \
-       | ${DC}
+       @pkglist=`${MAKE} ${MAKEFLAGS} run-depends-list`;               \
+       if [ "X$${pkglist}" != "X" ]; then                              \
+               ${ECHO} $${pkglist}                                     \
+               | ${XARGS} -n 1 ${SETENV} ${PKG_BEST_EXISTS}            \
+               | ${SORT} -u                                            \
+               | ${XARGS} -n 256 ${SETENV} ${PKG_INFO} -qs             \
+               | ${AWK} -- 'BEGIN { print("0 "); }                     \
+                       /^[0-9]+$$/ { print($$1, " + "); }              \
+                       END { print("p"); }'                            \
+               | ${DC};                                                \
+       else                                                            \
+               ${ECHO} "0";                                            \
+       fi
 
 
 ###



Home | Main Index | Thread Index | Old Index