Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662810 - app-eselect/eselect-postgresql-2.3 - symlinks must not dereference
Summary: app-eselect/eselect-postgresql-2.3 - symlinks must not dereference
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Aaron W. Swenson
URL:
Whiteboard:
Keywords:
Depends on: 674330
Blocks:
  Show dependency tree
 
Reported: 2018-08-04 23:26 UTC by Evert
Modified: 2019-02-16 11:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proof.txt (proof.txt,7.00 KB, text/plain)
2018-08-04 23:26 UTC, Evert
Details
emerge --info (emerge--info.txt,6.68 KB, text/plain)
2018-08-05 08:01 UTC, Evert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evert 2018-08-04 23:26:54 UTC
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 :)
Comment 1 Evert 2018-08-05 08:01:58 UTC
Created attachment 542450 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2018-10-21 11:00:31 UTC
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(-)
Comment 3 Aaron W. Swenson gentoo-dev 2018-10-21 11:29:44 UTC
This is available in my overlay. I'll give it a go for a little while before adding it to the tree.
Comment 4 Larry the Git Cow gentoo-dev 2018-11-07 11:41:51 UTC
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(+)
Comment 5 Aaron W. Swenson gentoo-dev 2019-02-16 11:55:34 UTC
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>