Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597564 - app-eselect/eselect-postgresql-1.2.1 fails to handle postgresql:10
Summary: app-eselect/eselect-postgresql-1.2.1 fails to handle postgresql:10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-19 17:47 UTC by Patrick Lauer
Modified: 2017-04-17 15:50 UTC (History)
0 users

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


Attachments
postgresql.eselect (postgresql.eselect,11.44 KB, text/plain)
2017-01-05 21:50 UTC, Aaron W. Swenson
Details
postgresql.eselect (postgresql.eselect,12.26 KB, text/plain)
2017-02-02 20:05 UTC, Aaron W. Swenson
Details
postgresql.eselect (postgresql.eselect,12.02 KB, text/plain)
2017-02-03 16:15 UTC, Aaron W. Swenson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2016-10-19 17:47:40 UTC
With dev-db/postgresl upstream deciding to rename the naming scheme instead of 9.7 the live ebuild should now be slot 10.

Changing the slot of dev-db/postgresl-9999 works, but eselect postgresql then has no idea what to do:

# emerge -p postgresql

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   *] dev-db/postgresql-9999

 # eselect postgresql list
Available PostgreSQL Slots
  9.6                        9.6.0


Note that 9.6 gets properly handled while live/10 is not listed at all.
Comment 1 Aaron W. Swenson gentoo-dev 2016-10-27 18:31:37 UTC
I'm working on another rewrite of the eselect module. It does catch the new slot format.
Comment 2 Aaron W. Swenson gentoo-dev 2017-01-05 21:50:07 UTC
Created attachment 458860 [details]
postgresql.eselect

This version makes the move to a stateless eselect, and should be ready for harsh review.

The goal here was to eliminate storing a bunch of files on the system with little utility as they're only used every few months, at most, when updating dev-db/postgresql

I'm still working on figuring out the utility of the environment file. The LDPATH variable doesn't seem to be loaded anywhere. Anyone have any insights on this? I may be able to eliminate this file entirely and make one other person happy that they'll have access to manpages immediately.
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2017-01-17 22:04:19 UTC
if postgresql ever needed to go multilib, the lib_dir() implementation attached wouldn't work.  Since we don't build multilib, I think we're fine for now tho.
Comment 4 Aaron W. Swenson gentoo-dev 2017-02-02 20:05:45 UTC
Created attachment 462282 [details]
postgresql.eselect

To test this, save postgresql.eselect to /usr/share/eselect/modules

Fixed numerous bugs. Much cleaner update section.

No environment file (/etc/env.d/50postgresql) may or may not have an impact. Please test all your things.
Comment 5 Aaron W. Swenson gentoo-dev 2017-02-03 16:15:36 UTC
Created attachment 462358 [details]
postgresql.eselect

A few more refinements. Now catches the case when there are no slots, and the case when there are slots but the previously selected slot is no longer available.
Comment 6 Aaron W. Swenson gentoo-dev 2017-02-04 17:37:30 UTC
I now have 2.0 available in my overlay along with some updated PostgreSQL ebuilds.

https://github.com/titanofold/titanofold-gentoo-x86

Really easy to add access. There may be another change or 2 I'll introduce to the eselect module, but it should be minor unless the lot of you discover some glaring issue.
Comment 7 Aaron W. Swenson gentoo-dev 2017-04-17 15:50:32 UTC
commit 96fb4f98f5c23f3454f501efae669f7584f98568
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Wed Apr 12 11:31:54 2017 -0400

    app-eselect/eselect-postgresql: Bug Fixes and Enhancements
    
    Version 2.0 is capable of handling the upcoming change in versioning
    for PostgreSQL.
    
    Links to pkg-config files of the selected slot are now created and
    managed by this module.
    
    Links to the man pages for the selected slot are now created and
    managed by this module. Slot-specific man pages are handled by the
    ebuilds.
    
    This version is stateless. It does not need to store any files to
    determine which slots and links are in use.
    
    Bugs: 597564, 512236, 564512