Commit 3f3281c8 authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild: fix circular dependency for symlink deps

The package should not have itself as dependency.
parent 11eb0f69
...@@ -1210,14 +1210,17 @@ scan_symlink_targets() { ...@@ -1210,14 +1210,17 @@ scan_symlink_targets() {
local symfile= targetpath= local symfile= targetpath=
cd "$datadir" cd "$datadir"
for symfile in "$pkgbasedir"/.control.*/.symlinks; do 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 while read symlink target; do
if [ "${target#/}" = "$target" ]; then if [ "${target#/}" = "$target" ]; then
target="${symlink%/*}/$target" target="${symlink%/*}/$target"
fi fi
targetpath="$datadir"/$(normalize_path "$target") targetpath="$datadir"/$(normalize_path "$target")
if [ -e "$targetpath" ] || [ -L "$targetpath" ]; then if [ -e "$targetpath" ] || [ -L "$targetpath" ]; then
local d="${symfile%/.symlinks}"
echo "$name=$pkgver-r$pkgrel" \ echo "$name=$pkgver-r$pkgrel" \
>> "$d"/.symlinks-needs >> "$d"/.symlinks-needs
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment