[pacman-dev] [PATCH 1/1] makepkg: relax package building for new directory symlink handling

Christian Hesse list at eworm.de
Wed Dec 31 14:45:32 UTC 2014


From: Christian Hesse <mail at eworm.de>

pacman changed directory symlink handling, resulting some packages to
fail installing with conflicts. This relaxes the situation as symlinks
are created before package() and removed after, resulting in file always
being installed to correct locations.

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 scripts/makepkg.sh.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 0db9912..2d4b0fd 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1738,7 +1738,20 @@ run_package() {
 		pkgfunc="package_$1"
 	fi
 
+	ln -s usr/bin "$pkgdir"/bin
+	ln -s usr/lib "$pkgdir"/lib
+	ln -s usr/lib "$pkgdir"/lib64
+	ln -s usr/bin "$pkgdir"/sbin
+	ln -s lib "$pkgdir"/usr/lib64
+	ln -s ../man "$pkgdir"/usr/local/share/man
+	ln -s bin "$pkgdir"/usr/sbin
+	ln -s ../run/lock "$pkgdir"/var/lock
+	ln -s spool/mail "$pkgdir"/var/mail
+	ln -s ../run "$pkgdir"/var/run
+
 	run_function_safe "$pkgfunc"
+
+	rm "$pkgdir"/{bin,lib,lib64,sbin,usr/{lib64,local/share/man,sbin},var/{lock,mail,run}}
 }
 
 build_id() {
-- 
2.2.1


More information about the pacman-dev mailing list