@@ -746,14 +746,14 @@ elif [[ "$os_PACKAGE" = "ebuild" ]]; then
746746fi
747747
748748if [[ $SYSLOG != " False" ]]; then
749- install_package rsyslog-relp
749+ is_package_installed rsyslog-relp || install_package rsyslog-relp
750750fi
751751
752752if is_service_enabled rabbit; then
753753 # Install rabbitmq-server
754754 # the temp file is necessary due to LP: #878600
755755 tfile=$( mktemp)
756- install_package rabbitmq-server > " $tfile " 2>&1
756+ is_package_installed || install_package rabbitmq-server > " $tfile " 2>&1
757757 cat " $tfile "
758758 rm -f " $tfile "
759759elif is_service_enabled qpid; then
@@ -768,7 +768,7 @@ elif is_service_enabled zeromq; then
768768 elif [[ " $os_PACKAGE " = " deb" ]]; then
769769 install_package libzmq1 python-zmq
770770 elif [[ " $os_PACKAGE " = " ebuild" ]]; then
771- install_package zeromq pyzmq
771+ is_package_installed zeromq pyzmq || install_package zeromq pyzmq
772772 fi
773773fi
774774
798798 fi
799799 # Install mysql-server
800800 if [[ " $os_PACKAGE " = " ebuild" ]]; then
801- install_package mysql
801+ is_package_installed mysql || install_package mysql
802802 else
803803 install_package mysql-server
804804 fi
@@ -812,7 +812,7 @@ if is_service_enabled horizon; then
812812 sudo rm -f /etc/httpd/conf.d/000-*
813813 install_package httpd mod_wsgi
814814 elif [[ " $os_PACKAGE " = " ebuild" ]]; then
815- install_package apache mod_wsgi
815+ is_package_installed apache mod_wsgi || install_package apache mod_wsgi
816816 fi
817817fi
818818
@@ -844,7 +844,7 @@ TRACK_DEPENDS=${TRACK_DEPENDS:-False}
844844# Install python packages into a virtualenv so that we can track them
845845if [[ $TRACK_DEPENDS = True ]] ; then
846846 echo_summary " Installing Python packages into a virtualenv $DEST /.venv"
847- install_package python-virtualenv
847+ is_package_installed python-virtualenv || install_package python-virtualenv
848848
849849 rm -rf $DEST /.venv
850850 virtualenv --system-site-packages $DEST /.venv
@@ -1180,8 +1180,10 @@ if is_service_enabled horizon; then
11801180 APACHE_NAME=apache2
11811181 APACHE_CONF=vhosts.d/horizon.conf
11821182 # Disable default config
1183- sudo rm -f /etc/apache2/vhosts.d/* default_* vhost.*
11841183 sudo touch /etc/$APACHE_NAME /$APACHE_CONF
1184+ # Enable WSGI if not already enabled
1185+ grep -E " APACHE2_OPTS.*-D WSGI" /etc/conf.d/apache2 ||
1186+ sudo sed ' s/APACHE2_OPTS=\"/APACHE2_OPTS=\"-D WSGI /' -i /etc/conf.d/apache2
11851187 fi
11861188
11871189 # Configure apache to run horizon
0 commit comments