summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abuild.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/abuild.in b/abuild.in
index 0813dd3..e76d873 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1210,14 +1210,17 @@ scan_symlink_targets() {
local symfile= targetpath=
cd "$datadir"
for symfile in "$pkgbasedir"/.control.*/.symlinks; do
- [ -e "$symfile" ] || continue
+ local d="${symfile%/.symlinks}"
+ if ! [ -e "$symfile" ] || [ "$d" = "$dir" ]; then
+ continue
+ fi
+
while read symlink target; do
if [ "${target#/}" = "$target" ]; then
target="${symlink%/*}/$target"
fi
targetpath="$datadir"/$(normalize_path "$target")
if [ -e "$targetpath" ] || [ -L "$targetpath" ]; then
- local d="${symfile%/.symlinks}"
echo "$name=$pkgver-r$pkgrel" \
>> "$d"/.symlinks-needs
fi