pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/check check-shlibs-macho.awk: Implement revision 1....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5763732c5db3
branches:  trunk
changeset: 380929:5763732c5db3
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri May 25 10:57:28 2018 +0000

description:
check-shlibs-macho.awk: Implement revision 1.3 correctly.

Skip any lines of otool output that do not start with a tab, ensuring we
only check valid files and ignore e.g. shell scripts.  Older versions of
otool would simply print no output on such files, whereas newer releases
print "is not an object file".

diffstat:

 mk/check/check-shlibs-macho.awk |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 739357a92da3 -r 5763732c5db3 mk/check/check-shlibs-macho.awk
--- a/mk/check/check-shlibs-macho.awk   Fri May 25 10:48:56 2018 +0000
+++ b/mk/check/check-shlibs-macho.awk   Fri May 25 10:57:28 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-shlibs-macho.awk,v 1.4 2018/05/25 09:26:49 jperkin Exp $
+# $NetBSD: check-shlibs-macho.awk,v 1.5 2018/05/25 10:57:28 jperkin Exp $
 
 #
 # Read a list of potential Mach-O binaries from stdin.
@@ -71,6 +71,8 @@
 function checkshlib(DSO,       needed, found) {
        cmd = "otool -XL " shquote(DSO) " 2>/dev/null"
        while ((cmd | getline) > 0) {
+               if ($0 !~ /^\t/)
+                       continue
                needed[$1] = ""
        }
        close(cmd)



Home | Main Index | Thread Index | Old Index