Merge lp:~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi into lp:anybox.recipe.openerp

Proposed by Laurent Mignon (Acsone)
Status: Merged
Merged at revision: 528
Proposed branch: lp:~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi
Merge into: lp:anybox.recipe.openerp
Diff against target: 46 lines (+12/-2)
3 files modified
CHANGES.rst (+2/-1)
anybox/recipe/openerp/runtime/session.py (+9/-1)
anybox/recipe/openerp/runtime/start_openerp.py (+1/-0)
To merge this branch: bzr merge lp:~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi
Reviewer Review Type Date Requested Status
Georges Racinet Approve
Review via email: mp+218744@code.launchpad.net

Description of the change

[FIX] lp:1317269 Set the path to the main script source file (openerp-server) as first item in sys.argv so that the server can use this argument to know where is this main script

To post a comment you must log in.
Revision history for this message
Georges Racinet (gracinet) wrote :

Bonjour,

je suis off cette semaine, mais je regarderai la semaine prochaine.

J'en profite pour te dire qu'on devrait reparler du sprint buildbot…

On 05/08/2014 08:37 AM, Laurent Mignon (Acsone) wrote:
> Laurent Mignon (Acsone) has proposed merging lp:~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi into lp:anybox.recipe.openerp.
>
> Requested reviews:
> Anybox (anybox)
> Related bugs:
> Bug #1317269 in OpenERP buildout recipe: "OSError: [Errno 2] Aucun fichier ou dossier de ce type"
> https://bugs.launchpad.net/anybox.recipe.openerp/+bug/1317269
>
> For more details, see:
> https://code.launchpad.net/~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi/+merge/218744
>
> [FIX] lp:1317269 Set the path to the main script source file (openerp-server) as first item in sys.argv so that the server can use this argument to know where is this main script

--
Georges Racinet
Anybox SAS, http://anybox.fr
Bureau: 09 72 39 50 97 / 09 72 39 13 06
Portable: 06 51 32 07 27
GPG: 0x33AB0A35, sur serveurs publics

Revision history for this message
Laurent Mignon (Acsone) (lmi) wrote :

Pas de souci.
Pour le sprint buildout, ce serait une bonne chose et avec plaisir.
J'ai vu que vous aviez un talk aux OpenDays sur le sujet. De notre côté on
présentera le travail sur pydev comme une extension à votre recipe. (je
dois encore nettoyer tout mon brol pour en en faire un egg qui dépende de
anybox.recipe.openerp)

A bientôt

lmi

On Thu, May 8, 2014 at 2:54 PM, Georges Racinet <email address hidden> wrote:

> Bonjour,
>
> je suis off cette semaine, mais je regarderai la semaine prochaine.
>
> J'en profite pour te dire qu'on devrait reparler du sprint buildbot…
>
> On 05/08/2014 08:37 AM, Laurent Mignon (Acsone) wrote:
> > Laurent Mignon (Acsone) has proposed merging
> lp:~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi into
> lp:anybox.recipe.openerp.
> >
> > Requested reviews:
> > Anybox (anybox)
> > Related bugs:
> > Bug #1317269 in OpenERP buildout recipe: "OSError: [Errno 2] Aucun
> fichier ou dossier de ce type"
> > https://bugs.launchpad.net/anybox.recipe.openerp/+bug/1317269
> >
> > For more details, see:
> >
> https://code.launchpad.net/~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi/+merge/218744
> >
> > [FIX] lp:1317269 Set the path to the main script source file
> (openerp-server) as first item in sys.argv so that the server can use this
> argument to know where is this main script
>
>
> --
> Georges Racinet
> Anybox SAS, http://anybox.fr
> Bureau: 09 72 39 50 97 / 09 72 39 13 06
> Portable: 06 51 32 07 27
> GPG: 0x33AB0A35, sur serveurs publics
>
>
>
> https://code.launchpad.net/~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi/+merge/218744
> You proposed lp:~acsone-openerp/anybox.recipe.openerp/1.8-bug-1317269-lmi
> for merging.
>

--
*Laurent Mignon*
*Senior Software Engineer*

*Tel : +352 20 21 10 20 32*
*Fax : +352 20 21 10 21*
*Gsm : +352 691 506 009*
*Email: <email address hidden> <email address hidden>*

*Acsone SA, Succursale de Luxembourg*
*22, Zone industrielle*
*L-8287 Kehlen, Luxembourg*
*www.acsone.eu <http://www.acsone.eu>*

Revision history for this message
Georges Racinet (gracinet) wrote :

Good for stable branch (seems harmless enough)

I felt compelled to check that this does introduce regression for v7 (no obvious problem)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGES.rst'
2--- CHANGES.rst 2014-04-19 17:30:50 +0000
3+++ CHANGES.rst 2014-05-08 06:27:48 +0000
4@@ -14,7 +14,8 @@
5
6 1.8.4 (unreleased)
7 ------------------
8--
9+- launchpad #1317269: [v8] OpenERP server can't start in a multi workers mode
10+- launchpad #1314566: [v8] OpenERP scripts & interpreter can't load db
11
12 1.8.3 (2014-04-19)
13 ------------------
14
15=== modified file 'anybox/recipe/openerp/runtime/session.py'
16--- anybox/recipe/openerp/runtime/session.py 2013-12-29 18:05:04 +0000
17+++ anybox/recipe/openerp/runtime/session.py 2014-05-08 06:27:48 +0000
18@@ -261,7 +261,15 @@
19 self.registry('ir.module.module').update_list(self.cr, self.uid)
20
21 def init_cursor(self):
22- self.cr = self._registry.db.cursor()
23+ db = getattr(self._registry, 'db', None)
24+ if db is None: # current trunk (future v8)
25+ self.cr = self._registry.cursor()
26+ else:
27+ # In OpenERP < 8, Registry.cursor() object is
28+ # a context manager providing auto closing,
29+ # but we don't want to control the whole lifespan
30+ # of the cursor.
31+ self.cr = db.cursor()
32
33 def registry(self, model):
34 """Lookup model by name and return a ready-to-work instance."""
35
36=== modified file 'anybox/recipe/openerp/runtime/start_openerp.py'
37--- anybox/recipe/openerp/runtime/start_openerp.py 2013-10-29 08:33:52 +0000
38+++ anybox/recipe/openerp/runtime/start_openerp.py 2014-05-08 06:27:48 +0000
39@@ -62,6 +62,7 @@
40 glob = globals()
41 glob['__name__'] = '__main__'
42 glob['__file__'] = starter
43+ sys.argv[0] = starter
44 try:
45 execfile(starter, globals())
46 except SystemExit as exc:

Subscribers

People subscribed via source and target branches