Browse code

Merge "Install EPEL for rhel6 if not detected"

Jenkins authored on 2013/06/01 01:28:24
Showing 2 changed files
... ...
@@ -1413,6 +1413,10 @@ function get_pip_command() {
1413 1413
     else
1414 1414
         which pip
1415 1415
     fi
1416
+
1417
+    if [ $? -ne 0 ]; then
1418
+        die $LINENO "Unable to find pip; cannot continue"
1419
+    fi
1416 1420
 }
1417 1421
 
1418 1422
 # Path permissions sanity check
... ...
@@ -51,13 +51,24 @@ fi
51 51
 # Installing Open vSwitch on RHEL6 requires enabling the RDO repo.
52 52
 RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack/openstack-grizzly/rdo-release-grizzly-3.noarch.rpm"}
53 53
 RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-grizzly"}
54
+# RHEL6 requires EPEL for many Open Stack dependencies
55
+RHEL6_EPEL_RPM=${RHEL6_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"}
56
+
54 57
 if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
58
+
55 59
     if ! yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then
56 60
         echo "RDO repo not detected; installing"
57
-        yum_install $RHEL6_RDO_REPO_RPM
61
+        yum_install $RHEL6_RDO_REPO_RPM || \
62
+            die $LINENO "Error installing RDO repo, cannot continue"
58 63
     fi
59
-fi
60 64
 
65
+    if ! yum repolist enabled epel | grep -q 'epel'; then
66
+        echo "EPEL not detected; installing"
67
+        yum_install ${RHEL6_EPEL_RPM} || \
68
+            die $LINENO "Error installing EPEL repo, cannot continue"
69
+    fi
70
+
71
+fi
61 72
 
62 73
 # Global Settings
63 74
 # ===============