summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-06 09:31:15 +0200
committerErich Eckner <git@eckner.net>2020-05-06 09:31:15 +0200
commitb5536a0a5041a3eae750bd62bf263f0e6fa7f32c (patch)
tree89a31042016b1359293aaa69505f5d216c26dc79
parent446c522988acb7d139b4db0a0dcf287a77794e08 (diff)
downloadarchlinuxewe-b5536a0a5041a3eae750bd62bf263f0e6fa7f32c.tar.xz
pin-dependencies.PKGBUILDpatch: only pin those libraries, which are not yet in the depends=() array (and thereby not yet version tracked)
-rw-r--r--pin-dependencies.PKGBUILDpatch24
1 files changed, 17 insertions, 7 deletions
diff --git a/pin-dependencies.PKGBUILDpatch b/pin-dependencies.PKGBUILDpatch
index 89902db2d..09e1be04a 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 \