Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475486 - app-office/openerp - remove USE=postgres in favour of a direct dev-db/postgresql-base dependency
Summary: app-office/openerp - remove USE=postgres in favour of a direct dev-db/postgre...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-07-02 11:19 UTC by Vicente Jiménez Aguilar
Modified: 2018-11-07 12:20 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vicente Jiménez Aguilar 2013-07-02 11:19:34 UTC
When we where developing the ebuild, I suggested to add the postgres USE flag to allow the installation of OpenERP without requiring a local PostgreSQL server.

OpenERP only works with a PostgreSQL database (local or remote) so postgresql-base is always needed as a direct dependency.

I suggest to modify current openerp ebuilds to include postgresql-base as a fixed dependency or conditional when postgres USE flag is not selected. That way we can remove the forced postgres USE flag from the ebuild.

Applied to current openerp-7.0.20130219-r5 I suggest:

@@ -17,10 +17,11 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~x86 ~amd64"
-IUSE="+postgres ldap ssl"
+IUSE="postgres ldap ssl"

 CDEPEND="!app-office/openerp-web
        postgres? ( dev-db/postgresql-server )
+       dev-db/postgresql-base
        dev-python/psutil
        dev-python/docutils
        dev-python/lxml

=== OR ===

@@ -17,10 +17,11 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~x86 ~amd64"
-IUSE="+postgres ldap ssl"
+IUSE="postgres ldap ssl"

 CDEPEND="!app-office/openerp-web
        postgres? ( dev-db/postgresql-server )
+       !postgres? ( dev-db/postgresql-base )
        dev-python/psutil
        dev-python/docutils
        dev-python/lxml



That said, maybe postgres isn't the correct USE flag name.
Maybe localdatabase, localdb or something clearer.
postgres USE flag is not there to select between different database engines because OpenERP only works with PostgreSQL.

Please, ebuilds experts comment below.


Reproducible: Always

Actual Results:  
We can't install OpenERP without installing PostgreSQL server locally. 

Expected Results:  
Have an use flag that allow to choose if a local installation of PostgreSQL server is preferred.

http://code.google.com/p/yarik-overlay/issues/detail?id=3#c20
Comment 1 Vicente Jiménez Aguilar 2013-07-03 11:27:40 UTC
Remove the USE=postgres flag is fine.
I'm just worried about the average user that just want to emerge openerp (on a clean server for example) and found that he doesn't have a local PostgreSQL database server.
Maybe we can include a warning if the ebuild detects that dev-db/postgresql-server package is not installed saying that a PostgreSQL server is needed and you can install one locally with "emerge dev-db/postgresql-server" or configure OpenERP to connect to an instance in another server.
Comment 2 Aaron W. Swenson gentoo-dev 2013-07-06 01:14:46 UTC
(In reply to Vicente Jiménez Aguilar from comment #1)
> Remove the USE=postgres flag is fine.
> I'm just worried about the average user that just want to emerge openerp (on
> a clean server for example) and found that he doesn't have a local
> PostgreSQL database server.
> Maybe we can include a warning if the ebuild detects that
> dev-db/postgresql-server package is not installed saying that a PostgreSQL
> server is needed and you can install one locally with "emerge
> dev-db/postgresql-server" or configure OpenERP to connect to an instance in
> another server.

No warning is necessary. However, a link to a guide would be handy.

The postgres USE flag should be removed. The PostgreSQL server is required, but it is not required to be installed locally. It is up to the administrator where they want the server to be installed and is a separate installation process that should not be lumped with this one.
Comment 3 Yixun Lan archtester gentoo-dev 2013-10-28 06:34:15 UTC
A doc would be great, maybe we could start with a wiki page..

also 
1) we need to pass the remote host name in the "emerge --config openerp" step or simply skip for remote server.
 
 psqlquery() {
-       psql -q -At -U postgres -d template1 -c "$@"
+       psql -q -At -U postgres -d template1 -h ${REMOTE_HOST} -c "$@"
 }

2) we also need to adjust /etc/openerp/openerp.cfg, to set correct remote host for postgresql server.

db_host = ${REMOTE_HOST}
Comment 4 Vladimir Datsevich 2014-12-16 21:47:53 UTC
Is this bug outdated? If so, maybe it is then possible to close it?