summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorNicoHood <git@nicohood.de>2017-01-07 14:50:27 +0100
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-03-04 15:00:12 +0100
commit58968cfaa239c2c4658b86a0fa81cfa1cd33f9cb (patch)
tree46f51e520580fd3c0c963708f159ff2e724e1615 /makechrootpkg.in
parentc8147a3512fbd7e721940a47e3d2b125078d1ad8 (diff)
downloaddevtools-58968cfaa239c2c4658b86a0fa81cfa1cd33f9cb.tar.xz
makechrootpkg: Fix broken symlink because of temporary chroot PKGDEST /pkgdest
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 284d444..766f237 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -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