summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-05-01 02:25:05 -0500
committerMax Rees <maxcrees@me.com>2020-05-01 02:25:05 -0500
commit107d6ff9f09106e7abfcf7e6b9a65f95edaf955c (patch)
treef72c0081d351cdde55b372dc1e2291456890eaf2
parent8149e535ea654af78d593995335d1aa50ffbd0dc (diff)
downloadabuild-checkapk.tar.gz
abuild-checkapk.tar.bz2
abuild-checkapk.tar.xz
abuild-checkapk.zip
checkapk: simplify rdeps search by using origins onlycheckapk
-rw-r--r--checkapk.in23
1 files changed, 6 insertions, 17 deletions
diff --git a/checkapk.in b/checkapk.in
index f254821..3ffc91d 100644
--- a/checkapk.in
+++ b/checkapk.in
@@ -207,24 +207,13 @@ check_soname() {
fi
rdeps="$($APK search --repositories-file "$tmpdir/repositories" \
- --rdepends --quiet --exact "$soname" | sort -u)"
-
- real_rdeps=
- for i in $rdeps; do
- self=0
- for j in $pkgname $subpackages; do
- [ "$i" = "$j" ] || continue
- self=1
- break
- done
- [ "$self" -eq 0 ] && real_rdeps="$real_rdeps
-$i"
- done
+ --rdepends --quiet --exact --origin "$soname" \
+ | sort -u | grep -Fvx "$pkgname")"
- if [ -n "$real_rdeps" ]; then
- warning "dependents on $soname:"
- # (warning2) >>> WARNING:
- printf '%s\n' "$real_rdeps" | sed '/^$/d; s/^/ /' >&2
+ if [ -n "$rdeps" ]; then
+ warning "dependent origins on $soname:"
+ # (warning2) >>> WARNING:
+ printf '%s\n' "$rdeps" | sed '/^$/d; s/^/ /' >&2
else
msg "No dependents on $soname."
fi