@@ -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
@@ -1182,8 +1182,7 @@ if is_service_enabled horizon; then
11821182 sudo touch /etc/$APACHE_NAME /$APACHE_CONF
11831183 # Enable WSGI for Apache if it's not enabled.
11841184 grep -E " ^APACHE2_OPTS=\" .*-D WSGI.*$" /etc/conf.d/apache2 ||
1185- sed -i ' s/APACHE2_OPTS="/APACHE2_OPTS="-D WSGI /g' /etc/conf.d/apache2
1186-
1185+ sudo sed -i ' s/APACHE2_OPTS="/APACHE2_OPTS="-D WSGI /g' /etc/conf.d/apache2
11871186 fi
11881187
11891188 # Configure apache to run horizon
0 commit comments