Commit a878a546 authored by Natanael Copa's avatar Natanael Copa

abuild: bugfix: find deps in subpackages and fail if deps not found

parent 2d6f0ab3
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment