abuild: fix circular dependency for symlink deps

The package should not have itself as dependency.
This commit is contained in:
Natanael Copa 2015-06-23 11:20:29 +00:00
parent 11eb0f69e7
commit 3f3281c87e
1 changed files with 5 additions and 2 deletions

View File

@ -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