Summary: | PostgreSQL 8.1.0 ebuild pkgsetup don't check correctly previous version | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pierre Poissinger <pierre.poissinger> |
Component: | New packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | esigra, gent_bz, jakub |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Proposed patch against ebuild
2nd version of patch |
Description
Pierre Poissinger
2005-11-13 04:14:41 UTC
Created attachment 72814 [details, diff]
Proposed patch against ebuild
This should check for a 8.1.x before executing upgrade
just a small add to be "clear": unmerge is not enough, deleting the left over data files is needed as well. The pkg_setup actually checks this directory...so it's cool... and honestly, this thing should be done by the user... Honestly, the ebuild should check against ${PGDATA}/PG_VERSION, which is set in /etc/conf.d/postgresql - not against a patch hardcoded in the ebuild, so that the check actually works for people that don't use the default location for pgsql databases. Created attachment 72835 [details, diff]
2nd version of patch
This one try to figure out the $PG_DIR using the /etc/conf.d/postgres file
(since, at least on my system, the PGDATA is not set)
Side effect: the config part will actually create the data dir on the location
given in /etc/conf.d/postgresql
typo in comment: /etc/conf.d/postgres is /etc/conf.d/postgresql ... Can we get a fix for this? This is quite clearly a bug in the ebuild (${PG_MINOR} -lt 0 ?? That'll work well for anyone upgrading from 8.-1 or earlier...). Either fix it or mask it. fixed. I have not applyed the patch in comment #4 yet. I'll looking into it later. Thanks for the fix Btw, since the check seems fine for me and will work for "most of people config", I passed it to "enhancement" severity... As far as I am concerned, it can be closed too. Up to Jakub/Masatomo/others to decide Closing this, as the actual ebuilds perform the needed check and have PG_DIR correctly defined. Best regards, CHTEKK. |