openerp-client points to wrong location when deployed with py2.6

Bug #676736 reported by Inaki Fernandez - OpenERPappliance.com
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

openerp Trunk
revision 5121 of trunk-extra-addons
Ubuntu lucid / python2.6:

A) openerp-server, openerp-web, and openerp-client are deployed in /usr/local/lib/python2.6/dist-packages/

openerp@openerp6desktop:~/production/openerp-client/bin$ ls -F /usr/local/lib/python2.6/dist-packages/
Beaker-1.5.1-py2.6.egg/ Mako-0.2.5-py2.6.egg/ openerp-server/ openerp_web-6.0.0_rc1-py2.6.egg/
CherryPy-3.1.2-py2.6.egg/ easy-install.pth openerp_client-6.0.0_rc1_1.egg-info python_dateutil-1.4.1-py2.6.egg/
FormEncode-1.2.3dev-py2.6.egg/ openerp-client/ openerp_server-6.0.0_rc1.egg-info/ simplejson-2.0.9-py2.6-linux-i686.egg/

openerp@openerp6desktop:~/production/openerp-client/bin$ ls /usr/local/lib/python2.6/dist-packages/openerp-server/
__init__.py import_xml.rng netsvc.pyc osv pychart report server.cert sql_db.py tiny_socket.py wizard
__init__.pyc ir openerp-server.py pooler.py release.py run_tests.py server.pkey sql_db.pyc tiny_socket.pyc workflow
addons netsvc.py openerp-server.pyc pooler.pyc release.pyc run_tests.pyc service test tools

ADDONS DIR IS ALMOST EMPTY:

openerp@openerp6desktop:~/production/openerp-client/bin$ ls /usr/local/lib/python2.6/dist-packages/openerp-server/addons/
__init__.py __init__.pyc base base_quality_interrogation.py base_quality_interrogation.pyc
openerp@openerp6desktop:~/production/openerp-client/bin$

B) openerp-server modules are deployed in other location! : /usr/lib/python2.6/site-packages/openerp-server/

openerp@openerp6desktop:~/production/openerp-client/bin$ ls /usr/lib/python2.6/site-packages/openerp-server/
addons

openerp@openerp6desktop:~/production/openerp-client/bin$ ls /usr/lib/python2.6/site-packages/openerp-server/addons/
account crm_caldav l10n_chart_at product_lot_foundry
account_accountant crm_claim l10n_chart_au product_m2mcategories
account_analytic_analysis crm_claim_refund l10n_chart_be_frnl product_manufacturer
[...]

C) openerp-client is not well deployed either:

openerp@openerp6desktop:~$ openerp-client
cd: 2: can't cd to /usr/lib/python2.6/site-packages/openerp-client
/usr/bin/python: can't open file './openerp-client.py': [Errno 2] No such file or directory

Note that openerp-client is not deployed in /usr/lib/python2.6/site-packages but in /usr/local/lib/python2.6/dist-packages/

openerp@openerp6desktop:~$ ls -l /usr/lib/python2.6/site-packages
total 4
drwxr-xr-x 3 openerp root 4096 Nov 6 17:50 openerp-server
openerp@openerp6desktop:~$

Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote : Re: [Bug 676736] [NEW] wrong openerp deployment in ubuntu lucid with py2.6

On Thursday 18 November 2010, you wrote:
> Public bug reported:
>
> openerp Trunk
> revision 5121 of trunk-extra-addons
> Ubuntu lucid / python2.6:
>

I think this is an Invalid report.

Unless you install from a Deb package, you shouldn't bother about the
arbitrary location of those files.

--
Say NO to spam and viruses. Stop using Microsoft Windows!

Revision history for this message
Inaki Fernandez - OpenERPappliance.com (inaki.fernandez) wrote : Re: wrong openerp deployment in ubuntu lucid with py2.6

modules should be located in openerp-server/bin/addons directory. Symbolic links are also allowed. Otherwise openerp-server will never reach its modules...

And regarding openerp-client.. It's setting up is broken too :

openerp@openerp6desktop:~$ openerp-client
cd: 2: can't cd to /usr/lib/python2.6/site-packages/openerp-client
/usr/bin/python: can't open file './openerp-client.py': [Errno 2] No such file or directory
openerp@openerp6desktop:~$

Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote : Re: [Bug 676736] Re: wrong openerp deployment in ubuntu lucid with py2.6

On Thursday 18 November 2010, you wrote:
> modules should be located in openerp-server/bin/addons directory.
> Symbolic links are also allowed. Otherwise openerp-server will /never/
> /reach/ its modules...

Sorry, but that's not entirely true.
Addons can be located at any path of the system. As of v6, addons can be
located under _multiple_ locations[1]. All this is configurable from either the
config file or the command line of the server.

But, anyway, the best setup is to allocate the pythonX.x/site-
packages/openerp-server for the server and place[2] the addons under the
/addons/ sub-folder there. Just like the packages do.

[1] this started off as a feature of developers that want to work with multiple
repositories simultaneously, but can be well used in production servers, too.
[2] install them, that is. No need to symlink.

--
Say NO to spam and viruses. Stop using Microsoft Windows!

Revision history for this message
Inaki Fernandez - OpenERPappliance.com (inaki.fernandez) wrote : Re: wrong openerp deployment in ubuntu lucid with py2.6

I should have pointed out that python packaging (python setup.py install) is not valid with python2.6 in Ubuntu Lucid. The bug description aims to show the outcome of such scenario.
Note that the same installation behaves differently when python2.5 and Ubuntu 8.04 is used instead. The former environment deploys well in a production system, while this is not happening in Lucid where extra configuration is required in order to make it work.

Perhaps this is a duplicate of bug #484740

Revision history for this message
Inaki Fernandez - OpenERPappliance.com (inaki.fernandez) wrote :

I was wrong about the location for openerp and addons directory in Ubuntu Lucid.

Apparently python2.5 and python2.6 deploy in different destination folders when running "python setup.py install".

Regarding the "addons" directory and its content, my mistake was to keep copying them into the same location used by python2.5 (/usr/lib/python2.5/site-packages/openerp-server/addons/) , instead of the new one corresponding to python2.6 (/usr/local/lib/python2.6/dist-packages/openerp-server/addons/)

Here the details are listed. Please note the current problem in points 2.1 and 2.2 :

1) OpenERP 5, Ubuntu 8.04 Hardy, python 2.5
==================================================================
/usr/lib/python2.5/site-packages/openerp-server/
/usr/lib/python2.5/site-packages/openerp-server/addons/
/usr/lib/python2.5/site-packages/openerp-client/
/usr/lib/python2.5/site-packages/openerp_web-5.0.12-py2.5.egg
/usr/bin/openerp-client (works)
/usr/bin/openerp-web (works)
/usr/bin/openerp-server (works)

2) OpenERP 6 (requires python2.6), Ubuntu 10.04 Lucid , python2.6
=================================================================================
/usr/local/lib/python2.6/dist-packages/openerp-server/
/usr/local/lib/python2.6/dist-packages/openerp-server/addons/
/usr/local/lib/python2.6/dist-packages/openerp-client/
/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.0_rc1-py2.6.egg/
/usr/local/bin/openerp-web (works)
/usr/local/bin/openerp-server (works)

2.1 openerp-client broken
====================
/usr/local/bin/openerp-client (BROKEN)
cd: 2: can't cd to /usr/lib/python2.6/site-packages/openerp-client
/usr/bin/python: can't open file './openerp-client.py': [Errno 2] No such file or directory

2.2 wrong path
===========
$ cat /usr/local/bin/openerp-client
#!/bin/sh
cd /usr/lib/python2.6/site-packages/openerp-client
exec /usr/bin/python ./openerp-client.py $@

CURRENT PATH!!:
/usr/local/lib/python2.6/dist-packages/openerp-client/

3) OpenERP 6 (requires python2.6), Ubuntu 8.04 Hardy, python2.5
======================================================================
/usr/lib/python2.5/site-packages/openerp-server/
/usr/lib/python2.5/site-packages/openerp-server/addons/
/usr/lib/python2.5/site-packages/openerp-client/
/usr/lib/python2.5/site-packages/openerp_web-6.0.0_rc1-py2.5.egg
/usr/bin/openerp-client (works)
/usr/bin/openerp-web (works)
Could not find /usr/bin/openerp-server

summary: - wrong openerp deployment in ubuntu lucid with py2.6
+ openerp-client points to wrong location when deployed with py2.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.