[pacman-dev] symlink handling in makepkg
Hello everybody, pacman changed directory symlink handling, making some packages fail to install with conflict to /usr/lib64 and others. How about solving this in makepkg? We could create the same symlinks before PKGBUILD's package() in run_package(), then remove afterwards. This would make packages install their files to correct places without fiddling with install pathes. I could prepare a patch if interested. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
From: Christian Hesse <mail@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@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
Christian Hesse <list@eworm.de> on Wed, 2014/12/31 15:45:
From: Christian Hesse <mail@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.
This is untested, so handle with care. Probably we have to create some directories (/usr, /var) as well... But you get the idea. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
On 12/31/14 at 03:45pm, Christian Hesse wrote:
From: Christian Hesse <mail@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@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
NACK. makepkg is not arch-specific; other distros may not have those symlinks. apg
Andrew Gregory <andrew.gregory.8@gmail.com> on Wed, 2014/12/31 09:54:
On 12/31/14 at 03:45pm, Christian Hesse wrote:
From: Christian Hesse <mail@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. [...]
NACK. makepkg is not arch-specific; other distros may not have those symlinks.
Ah, that's true... Ok - let's keep it as-is. ;) -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
participants (2)
-
Andrew Gregory
-
Christian Hesse