summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xabuild.in23
1 files changed, 11 insertions, 12 deletions
diff --git a/abuild.in b/abuild.in
index 5bef653..6f6ff45 100755
--- a/abuild.in
+++ b/abuild.in
@@ -370,7 +370,7 @@ EOF
prepare_tracedeps() {
local dir=${subpkgdir:-$pkgdir}
options_has "!tracedeps" && return 0
- find -name '*.so' | sed 's:.*/::' >"$dir"/.provides-so
+ find -name '*.so' -o -name '*.so.[0-9]*' | sed 's:.*/::' >"$dir"/.provides-so
scanelf -Rn "$dir" | awk '$1 == "ET_DYN" || $1 == "ET_EXEC" {print $2}' \
| sed 's:,:\n:g' | sort | uniq \
| while read i; do
@@ -396,17 +396,16 @@ pkginfo_val() {
trace_apk_deps() {
local name="$1"
local dir="$2"
- local i autodeps=
- msg "Tracing dependencies..."
+ local i j found autodeps=
+ msg "Tracing dependencies for $name..."
for i in $(cat "$dir"/.needs-so 2>/dev/null); do
- local j found
+ found=
# first check if its provide by same apkbuild
- for j in ../*/.provides-so; do
- if grep -w $i $j >/dev/null 2>&1; then
- j=${j##*/}
- found=${j%.*}
- break
- fi
+ for j in "$dir"/../*/.provides-so; do
+ grep -w "$i" "$j" >/dev/null || continue
+ found=${j##*/}
+ found=${found%/*}
+ break
done
# check apk db if not provided by a subpackage
if [ -z "$found" ]; then
@@ -420,8 +419,8 @@ trace_apk_deps() {
warning "You can remove '$found' from depends"
continue
fi
- list_has $found $autodeps || autodeps="$autodeps $found"
- msg "Added $found as dependency as it has $i"
+ list_has "$found" $autodeps || autodeps="$autodeps $found"
+ msg "Added '$found' as dependency as it has $i"
done
[ -z "$autodeps" ] && return 0
echo "# automatically detected:" >> "$dir"/.PKGINFO