Don't install ccache for RPM distros

ccache requires EPEL on centos, which we're trying to remove because
upstream RDO doesn't use these packages and thus it can lead to
incorrect testing.

Change-Id: I2c5bdef4d0fcde1e49c227df3cd694536e3e7443
This commit is contained in:
Ian Wienand 2017-03-01 14:01:33 +11:00
parent a44a41c4a0
commit 23777fe248
2 changed files with 50 additions and 41 deletions

View File

@ -12,7 +12,6 @@ class jenkins::params {
} else {
$jdk_package = 'java-1.7.0-openjdk-devel'
}
$ccache_package = 'ccache'
$python_netaddr_package = 'python-netaddr'
# FIXME: No Maven packages on RHEL
#$maven_package = 'maven'
@ -32,6 +31,9 @@ class jenkins::params {
$cgconfig_require = Package['cgroups']
$cgred_require = Package['cgroups']
}
# Don't use ccache; not available on centos without EPEL and we
# have wheel caches on fedora.
$ccache_package = undef
}
'Debian': {
# common packages

View File

@ -27,7 +27,6 @@ class jenkins::slave(
# Packages that all jenkins slaves need
$packages = [
$::jenkins::params::jdk_package, # jdk for building java jobs
$::jenkins::params::ccache_package,
$::jenkins::params::python_netaddr_package, # Needed for devstack address_in_net()
]
@ -106,52 +105,60 @@ class jenkins::slave(
require => Class[pip],
}
file { '/usr/local/bin/gcc':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
if ($::jenkins::params::ccache_package) {
file { '/usr/local/bin/g++':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
package { $::jenkins::params::ccache_package:
ensure => present,
}
file { '/usr/local/bin/cc':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/gcc':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/c++':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/g++':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-gcc":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/cc':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-g++":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/c++':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-cc":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-gcc":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-g++":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-cc":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-c++":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { "/usr/local/bin/${::hardwareisa}-linux-gnu-c++":
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/jenkins':