makechrootpkg: Fix broken symlink because of temporary chroot PKGDEST /pkgdest

This commit is contained in:
NicoHood 2017-01-07 14:50:27 +01:00 committed by Jan Alexander Steffens (heftig)
parent c8147a3512
commit 58968cfaa2
No known key found for this signature in database
GPG Key ID: A5E9288C4FA415FA
1 changed files with 6 additions and 0 deletions

View File

@ -233,6 +233,12 @@ move_products() {
for pkgfile in "$copydir"/pkgdest/*; do
chown "$src_owner" "$pkgfile"
mv "$pkgfile" "$PKGDEST"
# Fix broken symlink because of temporary chroot PKGDEST /pkgdest
if [[ "$PWD" != "$PKGDEST" && -L "$PWD/${pkgfile##*/}" ]]; then
rm "$PWD/${pkgfile##*/}"
ln -s "$PKGDEST/${pkgfile##*/}" "$PWD/${pkgfile##*/}"
fi
done
for l in "$copydir"/logdest/*; do