summary refs log tree commit diff
path: root/xrevshlib
blob: 17ce55bbd737db88b579b966e174c0bb082fea1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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 |
	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)"