1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
From 14af6a80cfbf657423334614b37a8f6f688dfe1a Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 5 Sep 2012 12:26:45 +0000
Subject: [PATCH] abuild: include correct version number for provides
This changes the format of .provides-so file. We now add a column with
the version number
---
abuild.in | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/abuild.in b/abuild.in
index ecb7c4d..a9ed449 100755
--- a/abuild.in
+++ b/abuild.in
@@ -775,14 +775,22 @@ EOF
prepare_tracedeps() {
local dir=${subpkgdir:-$pkgdir}
+ local etype= soname= file= sover=
[ "$arch" = "noarch" ] && return 0
options_has "!tracedeps" && return 0
# lets tell all the .so files this package provides in .provides-so
scanelf --recursive --nobanner --soname "$dir" | 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]*) echo ${soname##*/};;
+ *.so|*.so.[0-9]*)
+ soname=${soname##*/}
+ case "$file" in
+ *.so.[0-9]*) sover=${file##*.so.};;
+ esac
+ echo "$soname $sover"
+ ;;
esac
done >"$controldir"/.provides-so
# lets tell all the places we should look for .so files - all rpaths
@@ -794,7 +802,7 @@ prepare_tracedeps() {
| sed 's:,:\n:g' | sort | uniq \
| while read i; do
# only add files that are not self provided
- grep "^$i$" "$controldir"/.provides-so >/dev/null \
+ grep -q -w "^$i" "$controldir"/.provides-so \
|| echo $i >> "$controldir"/.needs-so
done
}
@@ -888,7 +896,7 @@ trace_apk_deps() {
found=
# first check if its provide by same apkbuild
for j in "$dir"/../.control.*/.provides-so; do
- grep -w "$i" "$j" >/dev/null || continue
+ grep -q -w "^$i" "$j" || continue
found=${j%/.provides-so}
found=${found##*/.control.}
break
@@ -921,7 +929,7 @@ trace_apk_deps() {
echo "# automatically detected:" >> "$dir"/.PKGINFO
if [ -f "$dir"/.provides-so ]; then
- sed 's/^\(.*\)/provides = so:\1=0/' "$dir"/.provides-so \
+ sed 's/^\(.*\) \([0-9].*\)/provides = so:\1=\2/' "$dir"/.provides-so \
>> "$dir"/.PKGINFO
fi
[ -z "$autodeps" ] && return 0
--
1.7.12
|