abuild: deal with duplicate provides
- remove duplicate provides with so version 0 - exit with error if there are multiple provides with different versions
This commit is contained in:
parent
f640500e4c
commit
ad777448b3
11
abuild.in
11
abuild.in
@ -992,7 +992,16 @@ scan_shared_objects() {
|
|||||||
esac
|
esac
|
||||||
list_has "$soname" $somask && continue
|
list_has "$soname" $somask && continue
|
||||||
echo "$soname $sover"
|
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
|
# now find the so dependencies
|
||||||
scanelf --nobanner --recursive --needed "$datadir" | tr ' ' ':' \
|
scanelf --nobanner --recursive --needed "$datadir" | tr ' ' ':' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user