about summary refs log tree commit diff
path: root/xrevshlib
blob: c5338685348cd6aaa84cd9867faef7e15f663c3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# xrevshlib PACKAGE - list packages shlib-dependent on PACKAGE or its subpkgs

pkg="${1?no package name given}"

xsubpkg "$pkg" |
	xargs -d'\n' -n1 -r xbps-query -R -p shlib-provides -S |
	sed 's/\.so.*//' |
	xargs -d'\n' -n1 -r xbps-query -R -p shlib-requires -s |
	sed 's/-[^- ]*: .*//' |
	sort -u |
	xargs -d'\n' -n1 -r xsubpkg -m |
	sort -u |
	grep -Fvx "$(xsubpkg -m $pkg)"