diff options
author | Erich Eckner <git@eckner.net> | 2019-01-04 14:37:41 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-04 14:37:41 +0100 |
commit | 9f54efd0ee4ffaac62bdab71830c0ef32e3e29b8 (patch) | |
tree | 5aa5d0dcc01a648d3111364aad8a369d5f3a3751 /pin-dependencies.PKGBUILDpatch | |
parent | 8eb5d7fae7eca4780348ce6c43ccac4ef22a1e81 (diff) | |
download | archlinuxewe-9f54efd0ee4ffaac62bdab71830c0ef32e3e29b8.tar.xz |
pin-dependencies.PKGBUILDpatch neu
Diffstat (limited to 'pin-dependencies.PKGBUILDpatch')
-rw-r--r-- | pin-dependencies.PKGBUILDpatch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pin-dependencies.PKGBUILDpatch b/pin-dependencies.PKGBUILDpatch new file mode 100644 index 000000000..a21ba0592 --- /dev/null +++ b/pin-dependencies.PKGBUILDpatch @@ -0,0 +1,33 @@ +_depends=( + $( + { + 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 \ + | while read -r _lib; do + pacman -Qqo "/usr/lib/${_lib}" 2>/dev/null || true + done \ + | sort -u \ + | xargs -r pacman -Q \ + | sed ' + s/ \([^-]\+\)-[^-]\+$/=\1/ + t + w /dev/stderr + d + ' + } \ + | sed ' + s/^\([^=[:space:]]\+\)\(=\(\S\+\)\)\?$/\0 \1 \3/ + ' \ + | sort -k2,2 -k3Vr,3 \ + | cut -d' ' -f1,2 \ + | uniq -f1 \ + | cut -d' ' -f1 + ) +) +depends=("${_depends[@]}") |