summaryrefslogtreecommitdiffstats
path: root/tools/install_venv_common.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2013-04-22 12:48:49 -0400
committerDan Prince <dprince@redhat.com>2013-04-23 09:31:34 -0400
commitd074063f16fbf2dfe2b592c41c44b75476b705b7 (patch)
treeab632f00e8a5a69d13fcf366e44aa1c0ec33d7be /tools/install_venv_common.py
parentda901232e9bbcf32ac6a86dc62fdd5fbf9bfb9c9 (diff)
downloadoslo-d074063f16fbf2dfe2b592c41c44b75476b705b7.tar.gz
oslo-d074063f16fbf2dfe2b592c41c44b75476b705b7.tar.xz
oslo-d074063f16fbf2dfe2b592c41c44b75476b705b7.zip
Avoid calling sudo in install_venv_common.py.
Updates our common venv installation routine so that it no longer attempts to automatically install missing RPM packages via sudo and instead just prints an error message and dies. The primary motivation here was to avoid sudo altogether since some people would rather not have the test suite run these sorts of systems admin commands for them. Change-Id: I350e5421a4dd3094217270d39547acaea0aeda3b
Diffstat (limited to 'tools/install_venv_common.py')
-rw-r--r--tools/install_venv_common.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py
index 4130656..f0a1722 100644
--- a/tools/install_venv_common.py
+++ b/tools/install_venv_common.py
@@ -180,10 +180,6 @@ class Fedora(Distro):
return self.run_command_with_code(['rpm', '-q', pkg],
check_exit_code=False)[1] == 0
- def yum_install(self, pkg, **kwargs):
- print "Attempting to install '%s' via yum" % pkg
- self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
-
def apply_patch(self, originalfile, patchfile):
self.run_command(['patch', '-N', originalfile, patchfile],
check_exit_code=False)
@@ -193,7 +189,7 @@ class Fedora(Distro):
return
if not self.check_pkg('python-virtualenv'):
- self.yum_install('python-virtualenv', check_exit_code=False)
+ self.die("Please install 'python-virtualenv'.")
super(Fedora, self).install_virtualenv()
@@ -211,7 +207,7 @@ class Fedora(Distro):
# Install "patch" program if it's not there
if not self.check_pkg('patch'):
- self.yum_install('patch')
+ self.die("Please install 'patch'.")
# Apply the eventlet patch
self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,