install_venv: apply eventlet patch correctly with python 2.7 (#890461)

Looks like the fix for #884915 only works with RHEL6. Make it work
correctly on Fedora 16.

Change-Id: I8c996f20d49db688fd8e692bcd836dee693d362a
This commit is contained in:
Mark McLoughlin 2011-11-15 08:43:46 +00:00
parent 06c8064af5
commit b0ad7284aa

View File

@ -110,6 +110,9 @@ class Fedora(Distro):
def yum_install(self, pkg, **kwargs): def yum_install(self, pkg, **kwargs):
run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs) run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
def apply_patch(self, originalfile, patchfile):
run_command(['patch', originalfile, patchfile])
def install_virtualenv(self): def install_virtualenv(self):
if self.check_cmd('virtualenv'): if self.check_cmd('virtualenv'):
return return
@ -143,9 +146,9 @@ class Fedora(Distro):
self.yum_install('patch') self.yum_install('patch')
# Apply the eventlet patch # Apply the eventlet patch
run_command(['patch', self.apply_patch(os.path.join(VENV, 'lib', PY_VERSION, 'site-packages',
'.nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py', 'eventlet/green/subprocess.py'),
'contrib/redhat-eventlet.patch']) 'contrib/redhat-eventlet.patch')
def get_distro(): def get_distro():