pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk in check-shlibs, throw away warning from `type ldd'...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f5851cfd2c5
branches:  trunk
changeset: 460144:4f5851cfd2c5
user:      grant <grant%pkgsrc.org@localhost>
date:      Fri Aug 22 13:32:40 2003 +0000

description:
in check-shlibs, throw away warning from `type ldd' and only attempt
to run ldd if it is executable.

fixes bug where binaries just installed would be run (!) and the
install process possibly "hang" on Darwin because Darwin has no ldd!

diffstat:

 mk/bsd.pkg.mk |  28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diffs (52 lines):

diff -r 863b81560f95 -r 4f5851cfd2c5 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Fri Aug 22 13:30:12 2003 +0000
+++ b/mk/bsd.pkg.mk     Fri Aug 22 13:32:40 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1239 2003/08/16 08:50:17 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1240 2003/08/22 13:32:40 grant Exp $
 #
 # This file is in the public domain.
 #
@@ -2670,20 +2670,22 @@
                shlibs="";                                              \
        fi;                                                             \
        if [ X${LDD} = X ]; then                                        \
-               ldd=`${TYPE} ldd | ${AWK} '{ print $$NF }'`;            \
+               ldd=`${TYPE} ldd 2>/dev/null | ${AWK} '{ print $$NF }'`;\
        else                                                            \
                ldd="${LDD}";                                           \
        fi;                                                             \
-       for i in $${bins} $${shlibs}; do                                \
-               err=`{ $$ldd $$i 2>&1 || ${TRUE}; } | { ${GREP} "not found" || ${TRUE}; }`; \
-               if [ "${PKG_VERBOSE}" != "" ]; then                     \
-                       ${ECHO} "$$ldd $$i";                            \
-               fi;                                                     \
-               if [ "$$err" != "" ]; then                              \
-                       ${ECHO} "$$i: $$err";                           \
-                       error=1;                                        \
-               fi;                                                     \
-       done;                                                           \
+       if [ -x "$$ldd" ]; then                                         \
+               for i in $${bins} $${shlibs}; do                        \
+                       err=`{ $$ldd $$i 2>&1 || ${TRUE}; } | { ${GREP} "not found" || ${TRUE}; }`; \
+                       if [ "${PKG_VERBOSE}" != "" ]; then             \
+                               ${ECHO} "$$ldd $$i";                    \
+                       fi;                                             \
+                       if [ "$$err" != "" ]; then                      \
+                               ${ECHO} "$$i: $$err";                   \
+                               error=1;                                \
+                       fi;                                             \
+               done;                                                   \
+       fi;                                                             \
        if [ "$$error" = 1 ]; then                                      \
                ${ECHO} "*** The above programs/libs will not find the listed shared libraries"; \
                ${ECHO} "    at runtime. Please fix the package (add -Wl,-R.../lib in the right places)!"; \
@@ -4327,7 +4329,7 @@
                        ${ECHO} "PROVIDES=$$i" >> ${BUILD_INFO_FILE};   \
                done;                                                   \
                case "${LDD}" in                                        \
-               "")     ldd=`${TYPE} ldd | ${AWK} '{ print $$NF }'`;;   \
+               "")     ldd=`${TYPE} ldd 2>/dev/null | ${AWK} '{ print $$NF }'`;; \
                *)      ldd="${LDD}";                                   \
                esac;                                                   \
                if ${TEST} "$$bins" != "" -o "$$libs" != ""; then       \



Home | Main Index | Thread Index | Old Index