Stabilization target: =app-eselect/eselect-postgresql-2.2 ~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 2.2 fixed a major bug (625368) that can leave systems in an insane state if a PostgreSQL slot that is set as the default is unmerged before selecting another slot.
FWIW, eselect-postgresql-2.2 can be broken if selecting an already selected slot: # eselect postgresql list Available PostgreSQL Slots 9.4 * 9.4.12 # eselect postgresql set 9.4 Unsetting 9.4 as default...done. Setting 9.4 as the default...ln: failed to create symbolic link '/usr/include/postgresql/postgresql-9.4': File exists !!! Error: Unable to create link! postgresql-9.4 -> /usr/include/postgresql exiting At which point one has to manually remove the symlink again.
(In reply to Andreas Sturmlechner from comment #1) > FWIW, eselect-postgresql-2.2 can be broken if selecting an already selected > slot: > > > # eselect postgresql list > Available PostgreSQL Slots > 9.4 * 9.4.12 > > # eselect postgresql set 9.4 > Unsetting 9.4 as default...done. > Setting 9.4 as the default...ln: failed to create symbolic link > '/usr/include/postgresql/postgresql-9.4': File exists > !!! Error: Unable to create link! postgresql-9.4 -> /usr/include/postgresql > exiting > > > At which point one has to manually remove the symlink again. It shouldn't even be trying to make that link as it is senseless; there's no /usr/include/postgresql-${slot}/postgresql-${slot} directory. There's just /usr/include/postgresql-${slot} and its contents with no self-reference. To make matters worse, I've run into it once, but I've been unable to replicate it. I thought it was an artifact of my testing. I'm certain now that you've removed that link, you can run `eselect postgresql set 9.4` again and it will work as expected.
ia64 stable
(In reply to Aaron W. Swenson from comment #2) > (In reply to Andreas Sturmlechner from comment #1) > It shouldn't even be trying to make that link as it is senseless; there's no > /usr/include/postgresql-${slot}/postgresql-${slot} directory. There's just > /usr/include/postgresql-${slot} and its contents with no self-reference. > > To make matters worse, I've run into it once, but I've been unable to > replicate it. I thought it was an artifact of my testing. > > I'm certain now that you've removed that link, you can run `eselect > postgresql set 9.4` again and it will work as expected. # eselect postgresql list Available PostgreSQL Slots 9.4 9.4.12 9.6 9.6.4 # eselect postgresql set 9.6 Setting 9.6 as the default...ln: failed to create symbolic link '/usr/include/postgresql/postgresql-9.6': File exists !!! Error: Unable to create link! postgresql-9.6 -> /usr/include/postgresql exiting # ls -l /usr/include/postgresql-9.6/postgresql* lrwxrwxrwx 1 root root 14 11. Aug 10:51 /usr/include/postgresql-9.6/postgresql-9.4 -> postgresql-9.4 lrwxrwxrwx 1 root root 14 11. Aug 00:39 /usr/include/postgresql-9.6/postgresql-9.5 -> postgresql-9.5 lrwxrwxrwx 1 root root 14 7. Mai 19:16 /usr/include/postgresql-9.6/postgresql-9.6 -> postgresql-9.6 all dead links...
Ah, but after removing those, now it works. I can switch back and forth as much as I like now. ;)
ppc/ppc64 stable
Hi, Also wrt bug 625368. Upgraded to 2.2 to work around bug. Then I entered in a mouse hunt to delete symlinks that was without end. Every time eselect fails with an existing file, it doesn't clean up it's own mess. Meaning that if one forgets to delete a single symlink before running `eselect postgresql set 1` it will create what it can and then aborts. After deleting the file you are confronted with in the error, the next fail will find files you already deleted in the past attempts So first off all I want to share this with fellow user in case they stumble on the bug report looking for a solutions. It is important that all this symlinks are deleted before attempting the new version of app-eselect/eselect-postgresql-2.2: /usr/include/libpq -> postgresql-9.5/libpq /usr/include/libpq-fe.h -> postgresql-9.5/libpq-fe.h /usr/include/postgres_ext.h -> postgresql-9.5/postgres_ext.h /usr/include/postgresql-9.6/postgresql-9.6 -> postgresql-9.6 /usr/include/pg_config_ext.h -> postgresql-9.5/pg_config_ext.h /usr/include/pg_config_manual.h -> postgresql-9.5/pg_config_manual.h (Credit to Anton Bolshakov) Second, but this is up to the developer if he considers it important or not. Although this is a inconsistent state of symlinks, which the software was not meant to deal with. It does expose the fact that it is not performing any sanity check before modifying symlinks. Eg. existence could be checked before execution. (Who knows what could be wrong on a file system). But it's really up to you guys, off course. Let me know if you need a separate bug report for this.
amd64 stable
ya, this broke existing installs of things (postfix in my case). I changed all the linkings to be forceful as my fix though (edit the eselect script to change ln -s to ln -sf).
x86 stable
Stable on alpha.
arm stable
sparc stable (thanks to Rolf Eike Beer)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fb5707e09234326c4fd71ddc0b6b34d66775968 commit 9fb5707e09234326c4fd71ddc0b6b34d66775968 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-01-14 18:25:05 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-01-14 18:25:33 +0000 app-eselect/eselect-postgresql: Bump to 2.3 ln now tries to force the link (Thanks Matthew Thode [prometheanfire]) Cleans up nonsensical links in /usr/include/postgresql-* that were made by some previous versions of this module. Bug: https://bugs.gentoo.org/627476 Bug: https://bugs.gentoo.org/631936 Bug: https://bugs.gentoo.org/640154 Bug: https://bugs.gentoo.org/640394 Package-Manager: Portage-2.3.13, Repoman-2.3.3 app-eselect/eselect-postgresql/Manifest | 1 + .../eselect-postgresql-2.3.ebuild | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+)}
commit 5c2b716fa91bf2b32c9a06a3e74a2ebb14be73c0 Author: Jeroen Roovers <jer@gentoo.org> Date: Sun Feb 11 12:58:21 2018 +0100 app-eselect/eselect-postgresql: Stable for HPPA too. Last arch. Closing.