Pg_repack is a very usefull postgresql extension that ought to be packaged in Gentoo. http://reorg.github.io/pg_repack/ Reproducible: Always
Created attachment 380656 [details] pg_repack-1.2.1.ebuild While the ebuild itself is very simple, there's some trickery involved to make it istall for every postgresql slot instead of just the active one. I'm not sure it's the right approach, but it's simple and works.
See also bug #496894 for the pg slot issue.
Thank you for your work. Unfortunately, I cannot accept this ebuild as it is. * src_prepare() won't fail As the sed statements are there to fix a bug, it would be unfortunate if they failed and the ebuild continued building for each slot incorrectly. * Eselect Module Use "eselect --brief postgresql list" to get the installed PostgreSQL slot. It's a good deal more foolproof than your solution, and can handle the situation where $ROOT is not /. * Compile in src_compile() We can't break the rules. Take a look at dev-db/pgtap for a solution to this. I'm also actively working on an eclass[1] that'd replace most of the work here. * Assumes postgresql-server installed for slot dev-db/postgresql-base installs pg_config. Its existence does not imply dev-db/postgresql-server has been installed for that slot. Instead, use: find "${EROOT}/usr/bin" -name "postgres${slot//./}" I apologize for the delayed response. It's great that you started this and is appreciated. I look forward to the next iteration. [1] https://github.com/titanofold/titanofold-gentoo-x86/tree/pgsql-eclass/eclass
(In reply to Aaron W. Swenson from comment #3) > * Assumes postgresql-server installed for slot > dev-db/postgresql-base installs pg_config. Its existence does not imply > dev-db/postgresql-server has been installed for that slot. Instead, use: > find "${EROOT}/usr/bin" -name "postgres${slot//./}" Actually, I forgot we have a function specifically meant to perform the task. You want to use: has_version "dev-db/postgresql-server:${slot}"
Please don't reassign it. Just close it when the package is in the tree.