summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-09-08 13:45:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-09-08 13:45:34 +0000
commitc57a9070f27ad10f507f36a88b01ab6f019b46cd (patch)
treefc127b5d929662f4410c0202ce6ea6f490ffd9e4 /abuild.in
parentd15a37b230b219f74f19e1ecd4c6b904a927f8d2 (diff)
downloadabuild-c57a9070f27ad10f507f36a88b01ab6f019b46cd.tar.gz
abuild-c57a9070f27ad10f507f36a88b01ab6f019b46cd.tar.bz2
abuild-c57a9070f27ad10f507f36a88b01ab6f019b46cd.tar.xz
abuild-c57a9070f27ad10f507f36a88b01ab6f019b46cd.zip
abuild: dont add .so files with mismatching soname version
Skip .so files without version number in filename when soname has version number. This solves issue with libgcj/gcc-java who ships both libgcj_bc.so and libgcj_bc.so.1.0.0 which both has soname libgcj_bc.so.1
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in24
1 files changed, 18 insertions, 6 deletions
diff --git a/abuild.in b/abuild.in
index 889fa75..60cb91c 100755
--- a/abuild.in
+++ b/abuild.in
@@ -952,17 +952,29 @@ scan_shared_objects() {
# lets tell all the .so files this package provides in .provides-so
scanelf --nobanner --soname "$@" | while read etype soname file; do
# if soname field is missing, soname will be the filepath
- # we only want shared libs
sover=0
- case $soname in
- *.so|*.so.[0-9]*)
+ if [ -z "$file" ]; then
+ file="$soname"
soname=${soname##*/}
- case "$file" in
- *.so.[0-9]*) sover=${file##*.so.};;
+ fi
+
+ # we only want shared libs
+ case $soname in
+ *.so|*.so.[0-9]*);;
+ *) continue;;
+ esac
+
+ case "$file" in
+ *.so.[0-9]*) sover=${file##*.so.};;
+ *.so)
+ # filter out sonames with version when file does not
+ # have version
+ case "$soname" in
+ *.so.[0-9]*) continue;;
esac
- echo "$soname $sover"
;;
esac
+ echo "$soname $sover"
done > "$controldir"/.provides-so
# now find the so dependencies