From b5536a0a5041a3eae750bd62bf263f0e6fa7f32c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 6 May 2020 09:31:15 +0200 Subject: pin-dependencies.PKGBUILDpatch: only pin those libraries, which are not yet in the depends=() array (and thereby not yet version tracked) --- pin-dependencies.PKGBUILDpatch | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'pin-dependencies.PKGBUILDpatch') diff --git a/pin-dependencies.PKGBUILDpatch b/pin-dependencies.PKGBUILDpatch index 89902db2..09e1be04 100644 --- a/pin-dependencies.PKGBUILDpatch +++ b/pin-dependencies.PKGBUILDpatch @@ -3,13 +3,23 @@ if printf '%s\n' "${arch[@]}" | grep -qvxF any; then $( { printf '%s\n' "${depends[@]}" - 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 + printf '%s\n' "${depends[@]}" \ + | sed ' + s/[<>=].*$// + /\.so$/ !d + p + ' + } \ + | sort \ + | uniq -u \ | while read -r _lib; do pacman -Qqo "/usr/lib/${_lib}" 2>/dev/null || true done \ -- cgit v1.2.3-54-g00ecf