mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-23 07:22:53 +00:00
abuild: include correct version number for provides
This changes the format of .provides-so file. We now add a column with the version number
This commit is contained in:
parent
a5cc84e229
commit
14af6a80cf
16
abuild.in
16
abuild.in
@ -775,14 +775,22 @@ EOF
|
|||||||
|
|
||||||
prepare_tracedeps() {
|
prepare_tracedeps() {
|
||||||
local dir=${subpkgdir:-$pkgdir}
|
local dir=${subpkgdir:-$pkgdir}
|
||||||
|
local etype= soname= file= sover=
|
||||||
[ "$arch" = "noarch" ] && return 0
|
[ "$arch" = "noarch" ] && return 0
|
||||||
options_has "!tracedeps" && return 0
|
options_has "!tracedeps" && return 0
|
||||||
# lets tell all the .so files this package provides in .provides-so
|
# lets tell all the .so files this package provides in .provides-so
|
||||||
scanelf --recursive --nobanner --soname "$dir" | while read etype soname file; do
|
scanelf --recursive --nobanner --soname "$dir" | while read etype soname file; do
|
||||||
# if soname field is missing, soname will be the filepath
|
# if soname field is missing, soname will be the filepath
|
||||||
# we only want shared libs
|
# we only want shared libs
|
||||||
|
sover=0
|
||||||
case $soname in
|
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
|
esac
|
||||||
done >"$controldir"/.provides-so
|
done >"$controldir"/.provides-so
|
||||||
# lets tell all the places we should look for .so files - all rpaths
|
# 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 \
|
| sed 's:,:\n:g' | sort | uniq \
|
||||||
| while read i; do
|
| while read i; do
|
||||||
# only add files that are not self provided
|
# 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
|
|| echo $i >> "$controldir"/.needs-so
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -888,7 +896,7 @@ trace_apk_deps() {
|
|||||||
found=
|
found=
|
||||||
# first check if its provide by same apkbuild
|
# first check if its provide by same apkbuild
|
||||||
for j in "$dir"/../.control.*/.provides-so; do
|
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=${j%/.provides-so}
|
||||||
found=${found##*/.control.}
|
found=${found##*/.control.}
|
||||||
break
|
break
|
||||||
@ -921,7 +929,7 @@ trace_apk_deps() {
|
|||||||
|
|
||||||
echo "# automatically detected:" >> "$dir"/.PKGINFO
|
echo "# automatically detected:" >> "$dir"/.PKGINFO
|
||||||
if [ -f "$dir"/.provides-so ]; then
|
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
|
>> "$dir"/.PKGINFO
|
||||||
fi
|
fi
|
||||||
[ -z "$autodeps" ] && return 0
|
[ -z "$autodeps" ] && return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user