Wrong error message in case of version conflict

Bug #1208028 reported by Georges Racinet
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenERP buildout recipe
Fix Committed
Medium
Unassigned

Bug Description

This may be for zc.buildout >= 2.0 only.

In case of version conflict (for instance between the requirement in [versions] and one dependency),
after the log messages that make the problem understandable, there's this traceback

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/gracinet/.buildout/eggs/zc.buildout-2.1.1-py2.7.egg/zc/buildout/buildout.py", line 1921, in main
    getattr(buildout, command)(args)
  File "/home/gracinet/.buildout/eggs/zc.buildout-2.1.1-py2.7.egg/zc/buildout/buildout.py", line 602, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/gracinet/.buildout/eggs/zc.buildout-2.1.1-py2.7.egg/zc/buildout/buildout.py", line 1356, in _call
    return f()
  File "/home/gracinet/openerp/recipe/anybox.recipe.openerp/anybox/recipe/openerp/base.py", line 718, in install
    self.install_requirements()
  File "/home/gracinet/openerp/recipe/anybox.recipe.openerp/anybox/recipe/openerp/base.py", line 257, in install_requirements
    missing = exc.message.split(os.linesep)[0].split()[-1]
IndexError: list index out of range

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

VersionConflict must be re-raised, here's a sample correct outcome

Error: There is a version conflict.
We already have: reportlab 2.5.anybox1

Changed in anybox.recipe.openerp:
status: New → Fix Committed
Revision history for this message
Georges Racinet (gracinet) wrote :

Released with 1.7.1

Changed in anybox.recipe.openerp:
status: Fix Committed → Fix Released
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Encountered the same issue

To reproduce, use zc.buildout >= 2.0

And try to install python-dateutil = 2.1

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Happened to me with anybox.recipe.openerp = 1.8.5

warning: no previously-included files matching '*~' found anywhere in distribution
The constraint, 2.1, is not consistent with the requirement, 'python-dateutil<2'.
While:
  Installing openerp.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/yvaucher/.buildout/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 1942, in main
    getattr(buildout, command)(args)
  File "/home/yvaucher/.buildout/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 622, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/yvaucher/.buildout/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 1366, in _call
    return f()
  File "/home/yvaucher/.buildout/eggs/anybox.recipe.openerp-1.8.5-py2.7.egg/anybox/recipe/openerp/base.py", line 739, in install
    self.install_requirements()
  File "/home/yvaucher/.buildout/eggs/anybox.recipe.openerp-1.8.5-py2.7.egg/anybox/recipe/openerp/base.py", line 283, in install_requirements
    missing = exc.message.split(os.linesep)[0].split()[-1]
IndexError: list index out of range

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

Yes, I see, thanks for easy reproduction.
I'm on it

Changed in anybox.recipe.openerp:
status: Fix Released → Confirmed
Revision history for this message
Georges Racinet (gracinet) wrote :

I ended up rewriting all this exception treatment in the stable branch.
Actually this notion of soft dependencies is not that useful currently (has been made for openerp-command), but it could well turn really useful again on short notice.

The exceptions raised by zc.buildout in case of problem with eggs installations (requirements) can vary, and they also depend on the version of zc.buildout itself. Interesting ranges are ( < 1.7, 1.7, >= 2.0). Could you please give it a try ?
I wrote as much unit-testing as I could.

Thanks !

Changed in anybox.recipe.openerp:
milestone: none → 1.8.6
status: Confirmed → Fix Committed
importance: Undecided → Medium
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.