makechrootpkg: Fix broken symlinks because of chroot SRCPKGDEST /srcpkgdest

Commit 58968cf fixed symlinks for package products in $startdir in
light of the simplified chroot setup.  However, a similar change needs
to be made for source-package products.  This was an easy omission to
make because makechrootpkg does not produce source-pakcages by
default.
This commit is contained in:
Luke Shumaker 2017-05-12 19:57:05 -04:00 committed by Jan Alexander Steffens (heftig)
parent a9dab95334
commit 3efa4b7bf5
No known key found for this signature in database
GPG Key ID: A5E9288C4FA415FA
1 changed files with 5 additions and 0 deletions

View File

@ -313,6 +313,11 @@ move_products() {
for s in "$copydir"/srcpkgdest/*; do
chown "$src_owner" "$s"
mv "$s" "$SRCPKGDEST"
# Fix broken symlink because of temporary chroot SRCPKGDEST /srcpkgdest
if [[ "$PWD" != "$SRCPKGDEST" && -L "$PWD/${s##*/}" ]]; then
ln -sf "$SRCPKGDEST/${s##*/}"
fi
done
}
# }}}