summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-05-12 19:57:05 -0400
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-07-05 18:22:31 +0200
commit3efa4b7bf550e87ade5f484e2f086e164292a51f (patch)
treed67918ccfa9498456a4da70aaa72975d0c7f9ce7
parenta9dab9533498577cd0196939bd9346310a7552e0 (diff)
downloaddevtools32-3efa4b7bf550e87ade5f484e2f086e164292a51f.tar.xz
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.
-rw-r--r--makechrootpkg.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index ffe6e42..246774a 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -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
}
# }}}