From 0f71188c1705df69ea03eb61cd6138205adb3725 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 4 Jun 2020 14:13:33 +0200 Subject: pin-dependencies.PKGBUILDpatch: do not complain about supposedly-missing library dependencies if the package itself provides them --- pin-dependencies.PKGBUILDpatch | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pin-dependencies.PKGBUILDpatch b/pin-dependencies.PKGBUILDpatch index f0e5ee8f..48c8aef9 100644 --- a/pin-dependencies.PKGBUILDpatch +++ b/pin-dependencies.PKGBUILDpatch @@ -1,13 +1,21 @@ if printf '%s\n' "${arch[@]}" | grep -qvxF any; then if ! _errors=$( diff <( - find "${pkgdir}" -type f -exec objdump -x {} \; 2>/dev/null \ - | sed ' - s/^\s*NEEDED\s\+\(\S\+\)\s*$/\1/ - t - d - ' \ - | sort -u \ + { + find "${pkgdir}" -type f -exec objdump -x {} \; 2>/dev/null \ + | sed ' + s/^\s*NEEDED\s\+\(\S\+\)\s*$/\1/ + t + d + ' \ + | sort -u + for _libdir in "${pkgdir}/usr"/lib*; do + [ -d "${_libdir}" ] || continue + find "${_libdir}" -type f -printf '%f\n%f\n' + done + } \ + | sort \ + | uniq -u \ | while read -r _lib; do if ! _pkg=$( pacman -Qqo "/usr/lib/${_lib}" 2>/dev/null @@ -50,7 +58,7 @@ if printf '%s\n' "${arch[@]}" | grep -qvxF any; then | sort -u ) ); then - printf 'There are discrepancies between the _pinned_dependencies and the linked libraries in %s'"'"'s %s:\n' \ + printf 'There are discrepancies between the _pinned_dependencies and the linked libraries in %s'"'"'s %s():\n' \ "${pkgbase:-${pkgname}}" \ "${FUNCNAME[1]}" printf '%s\n' "${_errors}" \ -- cgit v1.2.3-54-g00ecf