diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-30 15:19:12 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-10-30 15:23:20 +0000 |
commit | ad777448b349e5120083e9cfcf550c135c4af0f6 (patch) | |
tree | c9ed5a82d51de598dfbb62b7c6a1feffce02aad4 /abuild.in | |
parent | f640500e4cac6d126b8c109ffd277c2775243bdd (diff) | |
download | abuild-ad777448b349e5120083e9cfcf550c135c4af0f6.tar.gz abuild-ad777448b349e5120083e9cfcf550c135c4af0f6.tar.bz2 abuild-ad777448b349e5120083e9cfcf550c135c4af0f6.tar.xz abuild-ad777448b349e5120083e9cfcf550c135c4af0f6.zip |
abuild: deal with duplicate provides
- remove duplicate provides with so version 0
- exit with error if there are multiple provides with different versions
Diffstat (limited to 'abuild.in')
-rwxr-xr-x | abuild.in | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -992,7 +992,16 @@ scan_shared_objects() { esac list_has "$soname" $somask && continue echo "$soname $sover" - done | sort -u > "$controldir"/.provides-so + # 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]); }' \ + | sort -u > "$controldir"/.provides-so + + # verify that we dont have any duplicates + local dupes="$(cut -d' ' -f1 "$controldir"/.provides-so | uniq -d)" + if [ -n "$dupes" ]; then + die "provides multiple versions of same shared object: $dupes" + fi # now find the so dependencies scanelf --nobanner --recursive --needed "$datadir" | tr ' ' ':' \ |