diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-06-04 11:50:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-06-04 11:50:41 +0000 |
commit | e59de7c8a25ba3f26501a5f3be54ba464b0ff3f4 (patch) | |
tree | 3681112dfa303c841dc952edccce0bfd943e4cd1 /abuild.in | |
parent | fddc01bbbbe61ea81f4e582bcfbd1ec1f955f8c5 (diff) | |
download | abuild-e59de7c8a25ba3f26501a5f3be54ba464b0ff3f4.tar.gz abuild-e59de7c8a25ba3f26501a5f3be54ba464b0ff3f4.tar.bz2 abuild-e59de7c8a25ba3f26501a5f3be54ba464b0ff3f4.tar.xz abuild-e59de7c8a25ba3f26501a5f3be54ba464b0ff3f4.zip |
abuild: fix detection of symlink dependencies
- add as dep when the target is also a symlink
- fix handling of absolute path in target
Diffstat (limited to 'abuild.in')
-rw-r--r-- | abuild.in | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |