abuild: fix detection of symlink dependencies
- add as dep when the target is also a symlink - fix handling of absolute path in target
This commit is contained in:
parent
fddc01bbbb
commit
e59de7c8a2
@ -1176,12 +1176,16 @@ scan_shared_objects() {
|
||||
# find which package provides file that symlink points to
|
||||
scan_symlink_targets() {
|
||||
local name="$1" dir="$2" datadir="$3"
|
||||
local symfile
|
||||
local symfile= targetpath=
|
||||
cd "$datadir"
|
||||
for symfile in "$pkgbasedir"/.control.*/.symlinks; do
|
||||
[ -e "$symfile" ] || continue
|
||||
while read symlink target; do
|
||||
if [ -e "${symlink%/*}"/"$target" ]; then
|
||||
case "$target" in
|
||||
/*) targetpath="${datadir}/$target";;
|
||||
*) targetpath="${symlink%/*}/$target";;
|
||||
esac
|
||||
if [ -e "$targetpath" ] || [ -L "$targetpath" ]; then
|
||||
local d="${symfile%/.symlinks}"
|
||||
echo "$name=$pkgver-r$pkgrel" \
|
||||
>> "$d"/.symlinks-needs
|
||||
|
Loading…
x
Reference in New Issue
Block a user