Merge "Support EPEL for RHEL-7"

This commit is contained in:
Jenkins 2014-05-19 09:23:56 +00:00 committed by Gerrit Code Review
commit 0fae25c934
1 changed files with 4 additions and 2 deletions

View File

@ -375,8 +375,10 @@ def manage_epel(host, config):
if config['HOST_DETAILS'][host]['os'] in ('Fedora', 'Unknown'):
return
mirrors = ('https://mirrors.fedoraproject.org/metalink?repo=epel-6&'
'arch=$basearch')
# yum's $releasever can be non numeric on RHEL, so interpolate here
releasever = config['HOST_DETAILS'][host]['release'].split('.')[0]
mirrors = ('https://mirrors.fedoraproject.org/metalink?repo=epel-%s&'
'arch=$basearch' % releasever)
server = utils.ScriptRunner(host)
if config['CONFIG_USE_EPEL'] == 'y':
server.append('REPOFILE=$(mktemp)')