Support EPEL for RHEL-7
This patch makes EPEL repo installation work on all RHEL versions. EPEL release is not hardcoded anymore. Change-Id: Ic2a776e563e1e0538806c5d6632e6a4f946be513
This commit is contained in:
@@ -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)')
|
||||
|
||||
Reference in New Issue
Block a user