diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-03 19:50:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-03 19:50:06 +0000 |
commit | a878a54660b1ccd150567237f2d5a8f4e79ba829 (patch) | |
tree | 6c214742f2566f82cf23bf0d02ac1a64b7684d1c /abuild.in | |
parent | 2d6f0ab38dfc0dcf573c157c8e5070d828c34e61 (diff) | |
download | abuild-a878a54660b1ccd150567237f2d5a8f4e79ba829.tar.gz abuild-a878a54660b1ccd150567237f2d5a8f4e79ba829.tar.bz2 abuild-a878a54660b1ccd150567237f2d5a8f4e79ba829.tar.xz abuild-a878a54660b1ccd150567237f2d5a8f4e79ba829.zip |
abuild: bugfix: find deps in subpackages and fail if deps not found
Diffstat (limited to 'abuild.in')
-rwxr-xr-x | abuild.in | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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 |