diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-08-18 16:56:26 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-08-18 16:56:26 +0200 |
commit | 72fefe0f1d17e21e89c9f72217e14e5b982edb12 (patch) | |
tree | 055917f4fca44ba82818749de1796c7ca6fd9a61 | |
parent | a2c4d5b00d4823941e17d6bdce7a0025112d1a0f (diff) | |
download | abuild-72fefe0f1d17e21e89c9f72217e14e5b982edb12.tar.gz abuild-72fefe0f1d17e21e89c9f72217e14e5b982edb12.tar.bz2 abuild-72fefe0f1d17e21e89c9f72217e14e5b982edb12.tar.xz abuild-72fefe0f1d17e21e89c9f72217e14e5b982edb12.zip |
abuild: add support for sonameprefix
This is a feature to prefix all so:* provides with a tag. This was done
so that the openjdk8 so depends would only be satisfied by openjdk8
provides and not openjdk7, which might provide same so:lib*.so file.
To use it do: sonameprefix="openjdk8:"
-rw-r--r-- | abuild.in | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1023,6 +1023,11 @@ find_so_files() { return 0 } +subpkg_provides_prefixed_so() { + [ -n "$sonameprefix" ] && grep -q -w "^$sonameprefix$1" \ + "$pkgbasedir"/.control.*/.provides-so 2>/dev/null +} + subpkg_provides_so() { grep -q -w "^$1" "$pkgbasedir"/.control.*/.provides-so 2>/dev/null } @@ -1053,9 +1058,11 @@ trace_apk_deps() { [ -f "$dir"/.needs-so ] && for i in $(cat "$dir"/.needs-so); do # first check if its provided by same apkbuild - grep -q -w "^$i" "$dir"/.provides-so 2>/dev/null && continue + grep -q -w "^$sonameprefix$i" "$dir"/.provides-so 2>/dev/null && continue - if subpkg_provides_so "$i" || cross_compiling \ + if subpkg_provides_prefixed_so "$i"; then + autodeps="$autodeps so:$sonameprefix$i" + elif subpkg_provides_so "$i" || cross_compiling \ || $APK info --quiet --installed "so:$i"; then autodeps="$autodeps so:$i" else @@ -1194,7 +1201,7 @@ scan_shared_objects() { ;; esac list_has "$soname" $somask && continue - echo "$soname $sover" + echo "$sonameprefix$soname $sover" # use awk to filter out dupes that has sover = 0 done | awk '{ if (so[$1] == 0) so[$1] = $2; } END { for (i in so) print(i " " so[i]); }' \ @@ -1212,7 +1219,7 @@ scan_shared_objects() { | sed 's:,:\n:g' | sort -u \ | while read soname; do # only add files that are not self provided - grep -q -w "^$soname" "$controldir"/.provides-so \ + grep -q -w "^$sonameprefix$soname" "$controldir"/.provides-so \ || list_has "$soname" $somask \ || echo $soname done > "$controldir"/.needs-so |