Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339312 - dev-db/postgis-1.5.2: emerge --config postgis fails with dev-db/postgresql-server-9.0
Summary: dev-db/postgis-1.5.2: emerge --config postgis fails with dev-db/postgresql-se...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-01 08:17 UTC by Alex. P. Burlutsky
Modified: 2011-05-01 17:36 UTC (History)
3 users (show)

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


Attachments
fix some issues with new postgresql (postgis-1.5.2.ebuild,5.97 KB, text/plain)
2010-10-01 08:18 UTC, Alex. P. Burlutsky
Details
fixed ebuild (postgis-1.5.2.ebuild,6.95 KB, text/plain)
2011-04-03 22:21 UTC, Ștefan Talpalaru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex. P. Burlutsky 2010-10-01 08:17:23 UTC
After install postgis:

emerge --config postgis

says:

createdb: invalid option -- 'q'
Try "createdb --help" for more information.
 *
 * ERROR: dev-db/postgis-1.5.2 failed. 

etc...

Reproducible: Always

Steps to Reproduce:
1. emerge postgresql-server ( 9.0 )
2. emerge postgis




New postgis have no files lwpostgis.sql, but it has in ebuild.
New postgresql's createdb have no option -q.
I try to fix it in ebuild. Please, see and correct if needed.
Comment 1 Alex. P. Burlutsky 2010-10-01 08:18:56 UTC
Created attachment 249139 [details]
fix some issues with new postgresql
Comment 2 Juergen Rose 2010-10-26 07:25:37 UTC
I had the same issue and the patch helped me to do 'emerge --config postgis',
but I still can't reconstruct my postgres database. 
If I try 'psql -U postgres -d postgres -f pg_dumpall-8.3', I get:
...
psql:pg_dumpall-8.3:72: ERROR:  could not access file "/usr/lib/postgresql//liblwgeom": No such file or directory
psql:pg_dumpall-8.3:75: ERROR:  function public.st_box2d_in(cstring) does not exist
psql:pg_dumpall-8.3:83: ERROR:  could not access file "/usr/lib/postgresql//liblwgeom": No such file or directory
psql:pg_dumpall-8.3:86: ERROR:  function public.st_box2d_out(box2d) does not exist

Any hint is appreciated.
Comment 3 Ștefan Talpalaru 2011-04-03 22:21:47 UTC
Created attachment 268433 [details]
fixed ebuild

DONE:
- fixed all the paths used in pkg_config()
- fixed load_before_upgrade.sql generation (the format changed a little with an extra line appearing after the 'C' one in some cases)
- removed emerge time checking for previous version (troublesome during development). Now we always build and install load_before_upgrade.sql and we always do soft-upgrades on existing, spatially-enabled databases. Testing revealed no problems.
- added logic for handling existing databases that weren't spatially enabled prior to being added to /etc/conf.d/postgis_dbs
- added a message about the 2 new tables probably needing some extra rights (the owner is usually postgres)
TODO:
- remove code duplication by writing some functions or improving the logic

Please test the ebuild and report any problems.
Comment 4 Aaron W. Swenson gentoo-dev 2011-05-01 17:36:25 UTC
  01 May 2011; Aaron W. Swenson <titanofold@gentoo.org>
  +postgis-1.5.2-r1.ebuild, +files/postgis_dbs, metadata.xml:
  Fixes bug 273960, 285082, 296172, 314243, 325113 and 339312