mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-31 23:59:12 +00:00
abuild: bugfix: find deps in subpackages and fail if deps not found
This commit is contained in:
parent
2d6f0ab38d
commit
a878a54660
23
abuild.in
23
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
|
||||
|
Loading…
Reference in New Issue
Block a user