Fix package dependency installation.
* The previous list of os packages was insufficient to support installation of all of tempest's python dependencies. This change adds the necessary dependencies for redhat. I leave it as an exercise for a non-redhat employee to update the corresponding list for debian. * stdlib's ensure_packages method is used instead of per-package checks for definition. * easy_install is used to install pip, rather than installing pip from a package and having both packaged and unpackaged veresions of pip installed on the host. Change-Id: Ie4f02d04f6a769c0fffb13d9c16dc3a3d4d533c1
This commit is contained in:
@@ -50,39 +50,17 @@ class tempest(
|
||||
|
||||
include 'tempest::params'
|
||||
|
||||
if ! defined(Package['git']){
|
||||
package {'git':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
ensure_packages([
|
||||
'git',
|
||||
'python-setuptools',
|
||||
])
|
||||
|
||||
if ! defined(Package['python-pip']){
|
||||
package {'python-pip':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
ensure_packages($tempest::params::dev_packages)
|
||||
|
||||
if ! defined(Package[$tempest::params::python_dev]){
|
||||
package {$tempest::params::python_dev:
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
if ! defined(Package[$tempest::params::libxslt_dev]){
|
||||
package {$tempest::params::libxslt_dev:
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
if ! defined(Package[$tempest::params::libxml2_dev]){
|
||||
package {$tempest::params::libxml2_dev:
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
exec { '/usr/bin/pip-python install -U pip':
|
||||
exec { 'install-pip':
|
||||
command => '/usr/bin/easy_install pip',
|
||||
unless => '/usr/bin/which pip',
|
||||
require => Package['python-pip'],
|
||||
require => Package['python-setuptools'],
|
||||
}
|
||||
|
||||
if $version_to_test == 'master' {
|
||||
|
@@ -1,13 +1,25 @@
|
||||
class tempest::params {
|
||||
|
||||
if $osfamily == 'redhat' {
|
||||
$python_dev = 'python-devel'
|
||||
$libxslt_dev = 'libxslt-devel'
|
||||
$libxml2_dev = 'libxml2-devel'
|
||||
$dev_packages = [
|
||||
'python-devel',
|
||||
'libxslt-devel',
|
||||
'libxml2-devel',
|
||||
'openssl-devel',
|
||||
'mysql-devel',
|
||||
'postgresql-devel',
|
||||
'patch',
|
||||
'gcc',
|
||||
]
|
||||
} elsif $osfamily == 'debian' {
|
||||
$libxslt_dev = 'libxslt-dev'
|
||||
$python_dev = 'python-dev'
|
||||
$libxml2_dev = 'libxml2-dev'
|
||||
# FIXME - This list of packages should be updated to match what is
|
||||
# specified for redhat.
|
||||
$dev_packages = [
|
||||
'python-dev',
|
||||
'libxslt-dev',
|
||||
'libxml2-dev',
|
||||
'libssl-dev',
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user