Created attachment 542410 [details] proof.txt eselect postgresql set ... creates bad symlinks which in some cases results in - eselect postgresql set ... errors - the psql binary not to be available anymore For proof, see the attached proof.txt This can easily be fixed by not dereferencing symlinks. So, /usr/share/eselect/modules/postgresql.eselect should be patched: any ln -sf ... should be replaced by ln -sfn ... In bash/sed language: # sed -i 's/ln -sf /ln -sfn /' /usr/share/eselect/modules/postgresql.eselect And don't worry, free-bsd also supports the ln -n option :)
Created attachment 542450 [details] emerge --info
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/postgresql/eselect.git/commit/?id=1cf8648293a946af9989c1a6094708160bbe38da commit 1cf8648293a946af9989c1a6094708160bbe38da Author: Aaron W. Swenson <aaron@grandmasfridge.org> AuthorDate: 2018-10-21 10:57:46 +0000 Commit: Aaron W. Swenson <aaron@grandmasfridge.org> CommitDate: 2018-10-21 10:57:46 +0000 Do not dereference links In some conditions, ln will follow symlinks it isn’t supposed to. Add the -n switch to keep that from happening. Closes: https://bugs.gentoo.org/662810 postgresql.eselect | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
This is available in my overlay. I'll give it a go for a little while before adding it to the tree.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4922a49a7ac5e31090f1a84ae51703d26c4c9ded commit 4922a49a7ac5e31090f1a84ae51703d26c4c9ded Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-11-07 11:41:21 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-11-07 11:41:33 +0000 app-eselect/eselect-postgresql: Bump to 2.4 In some conditions, ln will follow symlinks it isn’t supposed to. Add the -n switch to keep that from happening. Bug: https://bugs.gentoo.org/662810 Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Aaron Swenson <titanofold@gentoo.org> app-eselect/eselect-postgresql/Manifest | 1 + .../eselect-postgresql-2.4.ebuild | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+)
commit 46545be921d892881379d6e7b9d73c569a7496bf (HEAD -> master, origin/master, origin/HEAD) Author: Aaron W. Swenson <titanofold@gentoo.org> Date: Sat Feb 16 06:54:04 2019 -0500 app-eselect/eselect-postgresql: Drop old Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>