pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/check



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Nov 27 12:51:38 UTC 2023

Modified Files:
        pkgsrc/mk/check: check-shlibs-elf.awk check-shlibs-macho.awk

Log Message:
check-shlibs: Include DSO name in failure output.

Clarify the use of "DSO", previously it referred to both the original object
that was being checked, as well as any libraries it depended upon, which was
just confusing.  While here reduce some of the diffs between the two versions.
At some point they should really just be merged together as there is a huge
amount of duplication.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/mk/check/check-shlibs-elf.awk
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mk/check/check-shlibs-macho.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/check/check-shlibs-elf.awk
diff -u pkgsrc/mk/check/check-shlibs-elf.awk:1.19 pkgsrc/mk/check/check-shlibs-elf.awk:1.20
--- pkgsrc/mk/check/check-shlibs-elf.awk:1.19   Mon Oct 11 20:26:28 2021
+++ pkgsrc/mk/check/check-shlibs-elf.awk        Mon Nov 27 12:51:38 2023
@@ -1,4 +1,4 @@
-# $NetBSD: check-shlibs-elf.awk,v 1.19 2021/10/11 20:26:28 jperkin Exp $
+# $NetBSD: check-shlibs-elf.awk,v 1.20 2023/11/27 12:51:38 jperkin Exp $
 #
 # Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
 # All rights reserved.
@@ -38,7 +38,7 @@
 # Check that the resolved DSO belongs to full dependency.
 #
 
-function shquote(IN, out) {
+function shquote(IN,   out) {
        out = IN;
        gsub("\\\\", "\\\\", out);
        gsub("\n", "\\n", out);
@@ -68,19 +68,19 @@ function shquote(IN, out) {
        return out;
 }
 
-function check_pkg(DSO, pkg, found) {
+function check_pkg(DSO, lib,   pkg, found) {
        if (destdir == "")
                return 0
-       if (DSO in pkgcache) {
-               pkg = pkgcache[DSO]
+       if (lib in pkgcache) {
+               pkg = pkgcache[lib]
        } else {
-               cmd = pkg_info_cmd " -Fe " shquote(DSO) " 2> /dev/null"
+               cmd = pkg_info_cmd " -Fe " shquote(lib) " 2>/dev/null"
                if ((cmd | getline pkg) < 0) {
                        close(cmd)
                        return 0
                }
                close(cmd)
-               pkgcache[DSO] = pkg
+               pkgcache[lib] = pkg
        }
        if (pkg == "")
                return 0
@@ -95,9 +95,9 @@ function check_pkg(DSO, pkg, found) {
                }
        }
        if (found)
-               print DSO ": " pkg " is not a runtime dependency"
+               print DSO ": " lib ": " pkg " is not a runtime dependency"
        # Not yet:
-       # print DSO ": " pkg " is not a dependency"
+       # print DSO ": " lib ": " pkg " is not a dependency"
        close(depends_file)
 }
 
@@ -137,7 +137,7 @@ function checkshlib(DSO, needed, rpath, 
                                libcache[libfile] = system("test -f " shquote(libfile))
                        }
                        if (!libcache[libfile]) {
-                               check_pkg(rpath[p] "/" lib)
+                               check_pkg(DSO, rpath[p] "/" lib)
                                for (t = 1; t <= ntpaths; t++) {
                                        if (match(rpath[p] "/" lib, tpaths[t])) {
                                                print DSO ": resolved path " rpath[p] "/" lib " matches toxic " tpaths[t]

Index: pkgsrc/mk/check/check-shlibs-macho.awk
diff -u pkgsrc/mk/check/check-shlibs-macho.awk:1.10 pkgsrc/mk/check/check-shlibs-macho.awk:1.11
--- pkgsrc/mk/check/check-shlibs-macho.awk:1.10 Wed Nov  1 11:46:00 2023
+++ pkgsrc/mk/check/check-shlibs-macho.awk      Mon Nov 27 12:51:38 2023
@@ -1,4 +1,4 @@
-# $NetBSD: check-shlibs-macho.awk,v 1.10 2023/11/01 11:46:00 pho Exp $
+# $NetBSD: check-shlibs-macho.awk,v 1.11 2023/11/27 12:51:38 jperkin Exp $
 
 #
 # Read a list of potential Mach-O binaries from stdin.
@@ -37,19 +37,19 @@ function shquote(IN,        out) {
        return out;
 }
 
-function check_pkg(DSO,        pkg, found) {
+function check_pkg(DSO, lib,   pkg, found) {
        if (destdir == "")
                return 0
-       if (DSO in pkgcache) {
-               pkg = pkgcache[DSO]
+       if (lib in pkgcache) {
+               pkg = pkgcache[lib]
        } else {
-               cmd = pkg_info_cmd " -Fe " shquote(DSO) " 2>/dev/null"
+               cmd = pkg_info_cmd " -Fe " shquote(lib) " 2>/dev/null"
                if ((cmd | getline pkg) < 0) {
                        close(cmd)
                        return 0
                }
                close(cmd)
-               pkgcache[DSO] = pkg
+               pkgcache[lib] = pkg
        }
        if (pkg == "")
                return 0
@@ -64,7 +64,7 @@ function check_pkg(DSO,       pkg, found) {
                }
        }
        if (found)
-               print DSO ": " pkg " is not a runtime dependency"
+               print DSO ": " lib ": " pkg " is not a runtime dependency"
        close(depends_file)
 }
 



Home | Main Index | Thread Index | Old Index