newline in executable= causes assert failure on exec

Bug #381230 reported by Jeff Rush
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

Taking advantage of buildout's ability to transparently break attribute values across line causes newline characters to get stuck in them that later cause problems.

Example:

    executable =
        ${buildout:parts-directory}/python243/bin/python

results in the string:

    executable='\n/home/jeff/Clients/ZeOmega/task-CacheBySize/parts/python243/bin/python'

which causes use of this path in invoking setup.py within a recipe to fail:

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/jeff/Clients/ZeOmega/task-CacheBySize/lib/python2.5/site-packages/zc.buildout-1.2.1-py2.5.egg/zc/buildout/buildout.py", line 1509, in main
    getattr(buildout, command)(args)
  File "/home/jeff/Clients/ZeOmega/task-CacheBySize/lib/python2.5/site-packages/zc.buildout-1.2.1-py2.5.egg/zc/buildout/buildout.py", line 473, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/jeff/Clients/ZeOmega/task-CacheBySize/lib/python2.5/site-packages/zc.buildout-1.2.1-py2.5.egg/zc/buildout/buildout.py", line 1091, in _call
    return f()
  File "/var/tmp/buildout/eggs/plone.recipe.zope2install-3.0-py2.5.egg/plone/recipe/zope2install/__init__.py", line 227, in install
    ) == 0
AssertionError

Solution:

  Append a call to .strip() in two places in zc/recipe/egg/egg.py and zc/recipe/egg/custom.py:

      options['executable'] = buildout[python]['executable'].strip()

  This approach keeps any whitespace -within- the name, as might be desired in some cases.

Revision history for this message
Jeff Rush (jrush) wrote :
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.