Fix installation order 70/69870/1
authorVictor Morales <victor.morales@intel.com>
Thu, 4 Oct 2018 16:41:12 +0000 (09:41 -0700)
committerVictor Morales <victor.morales@intel.com>
Thu, 4 Oct 2018 16:41:12 +0000 (09:41 -0700)
The current order of the installation instructions in the setup.sh
script causes issues in some systems, mainly because they are lacking
of certain basic packages. This change includes the python packages
and fix the order of execution.

Change-Id: I73de55fc9d49a75953e3fbdde8290757adcadd7a
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-301

vagrant/setup.sh

index 2c4ece6..85900fd 100755 (executable)
@@ -61,6 +61,7 @@ packages=()
 case ${ID,,} in
     *suse)
     INSTALLER_CMD="sudo -H -E zypper -q install -y --no-recommends"
+    packages+=(python-devel)
 
     # Vagrant installation
     if [[ "${enable_vagrant_install+x}" ]]; then
@@ -95,6 +96,7 @@ case ${ID,,} in
     ubuntu|debian)
     libvirt_group="libvirtd"
     INSTALLER_CMD="sudo -H -E apt-get -y -q=3 install"
+    packages+=(python-dev)
 
     # Vagrant installation
     if [[ "${enable_vagrant_install+x}" ]]; then
@@ -124,6 +126,7 @@ case ${ID,,} in
     PKG_MANAGER=$(which dnf || which yum)
     sudo $PKG_MANAGER updateinfo
     INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -q -y install"
+    packages+=(python-devel)
 
     # Vagrant installation
     if [[ "${enable_vagrant_install+x}" ]]; then
@@ -150,13 +153,12 @@ case ${ID,,} in
 
 esac
 
+${INSTALLER_CMD} ${packages[@]}
 if ! which pip; then
     curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python
 fi
 sudo -H pip install --upgrade pip
 sudo -H pip install tox
-
-${INSTALLER_CMD} ${packages[@]}
 if [[ ${http_proxy+x} ]]; then
     vagrant plugin install vagrant-proxyconf
 fi