omelette breaks with eggs that declare nested "top-levels" in the wrong order

Bug #553005 reported by LeoRochael on 2010-04-01
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
collective.buildout
Undecided
David Glick

Bug Description

Some eggs declare more 'top-levels' than necessary, for instance by declaring as top-level a package that is nested in another package.

This is normally harmless, but if these top-levels are declared in the "wrong" order (nested package before its container) this breaks omelette, as it tries to create the link inside a directory that doesn't exist yet:

$ bin/buildout -v
Installing 'collective.recipe.omelette'.
Picked: collective.recipe.omelette = 0.9
Getting required 'zc.recipe.egg'
  required by collective.recipe.omelette 0.9.
Picked: zc.recipe.egg = 1.2.2
Installing omelette.
Installing 'SOAPPy ==0.12.0.1'.
We have the distribution that satisfies 'SOAPPy==0.12.0.1'.
Getting required 'PyXML'
  required by SOAPpy 0.12.0.1.
Picked: PyXML = 0.8.4
Getting required 'fpconst'
  required by SOAPpy 0.12.0.1.
Picked: fpconst = 0.7.2
While:
  Installing omelette.

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/leo/.buildout/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 1660, in main
    getattr(buildout, command)(args)
  File "/home/leo/.buildout/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 532, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/leo/.buildout/eggs/zc.buildout-1.4.3-py2.6.egg/zc/buildout/buildout.py", line 1204, in _call
    return f()
  File "/home/leo/.buildout/eggs/collective.recipe.omelette-0.9-py2.6.egg/collective/recipe/omelette/__init__.py", line 167, in install
    symlink(package_location, link_location)
OSError: [Errno 2] No such file or directory

See the attached buildout.cfg for a reproduction

LeoRochael (leorochael) wrote :

The following one-line patch fixes this issue. Omelette will just issue a warning instead of failing with packages that failed before

Ross Patterson (rossp) on 2011-06-18
Changed in collective.buildout:
status: New → Confirmed
Ross Patterson (rossp) wrote :

I just ran into this when using omelette with plone-coredev. Here's
some more detail when running buildout with "-D":

    While:
      Installing packages.
    Traceback (most recent call last):
      File "/usr/local/lib/python/site-packages/zc.buildout-1.4.4-py2.6.egg/zc/buildout/buildout.py", line 1683, in main
        getattr(buildout, command)(args)
      File "/usr/local/lib/python/site-packages/zc.buildout-1.4.4-py2.6.egg/zc/buildout/buildout.py", line 555, in install
        installed_files = self[part]._call(recipe.install)
      File "/usr/local/lib/python/site-packages/zc.buildout-1.4.4-py2.6.egg/zc/buildout/buildout.py", line 1227, in _call
        return f()
      File "/usr/local/lib/python/site-packages/collective.recipe.omelette-0.10-py2.6.egg/collective/recipe/omelette/__init__.py", line 170, in install
        symlink(package_location, link_location)
    OSError: [Errno 2] No such file or directory
    Starting pdb:
    > /usr/local/lib/python/site-packages/collective.recipe.omelette-0.10-py2.6.egg/collective/recipe/omelette/__init__.py(170)install()
    -> symlink(package_location, link_location)
    (Pdb) pp (package_location, link_location)
    ('/usr/local/lib/python/site-packages/rdflib-3.1.0-py2.6.egg/rdflib/plugins/parsers',
     '/home/xen/src/plone-coredev/parts/packages/rdflib/plugins/parsers')

Applying the previously attached patch fixes the issue.

David Glick (davisagli) on 2011-07-19
Changed in collective.buildout:
assignee: nobody → David Glick (davisagli)
status: Confirmed → Fix Committed
David Glick (davisagli) on 2011-07-19
Changed in collective.buildout:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers