Browse code

Ensure yum-utils is installed before using yum-config-manager

yum-utils provides yum-config-manager but the check for yum-utils is
currently being done after the first usage of yum-config-manager, which
fails if you don't have yum-utils already installed, so move it up
before the first usage of yum-config-manager.

Putting yum-utils in files/rpms/general doesn't help since
yum-config-manager is used in stack.sh before tools/install_prereqs.sh
is called.

Closes-Bug: #1467270

Change-Id: I74996c76838b7dc50d847e3bedb2d04dc55b4431

Matt Riedemann authored on 2015/06/22 01:02:59
Showing 1 changed files
... ...
@@ -263,6 +263,7 @@ gpgcheck=0
263 263
 EOF
264 264
     # Enable a bootstrap repo.  It is removed after finishing
265 265
     # the epel-release installation.
266
+    is_package_installed yum-utils || install_package yum-utils
266 267
     sudo yum-config-manager --enable epel-bootstrap
267 268
     yum_install epel-release || \
268 269
         die $LINENO "Error installing EPEL repo, cannot continue"
... ...
@@ -270,7 +271,6 @@ EOF
270 270
     sudo rm -f /etc/yum.repos.d/epel-bootstrap.repo
271 271
 
272 272
     # ... and also optional to be enabled
273
-    is_package_installed yum-utils || install_package yum-utils
274 273
     sudo yum-config-manager --enable rhel-7-server-optional-rpms
275 274
 
276 275
     RHEL_RDO_REPO_RPM=${RHEL7_RDO_REPO_RPM:-"https://repos.fedorapeople.org/repos/openstack/openstack-juno/rdo-release-juno-1.noarch.rpm"}