From d1a0f85869d4077a22c24743912711a8310eec96 Mon Sep 17 00:00:00 2001 From: Renat Lumpau Date: Wed, 3 Jan 2007 20:16:39 +0000 Subject: [PATCH] Do not call w-c to remove a vhost copy of a web app if USE=vhosts. Bug 136959 --- eclass/webapp.eclass | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass index e6ec8547e888..e63936bd54d0 100644 --- a/eclass/webapp.eclass +++ b/eclass/webapp.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.47 2006/12/31 19:16:31 rl03 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.48 2007/01/03 20:16:39 rl03 Exp $ # # eclass/webapp.eclass # Eclass for installing applications to run under a web server @@ -527,21 +527,23 @@ function webapp_pkg_prerm () return fi - for x in ${my_output} ; do - [ -f ${x}/.webapp ] && . ${x}/.webapp || ewarn "Cannot find file ${x}/.webapp" + if ! use vhosts ; then # remove any installed copies - if [ -z "${WEB_HOSTNAME}" -o -z "${WEB_INSTALLDIR}" ]; then - ewarn "Don't forget to use webapp-config to remove the copy of" - ewarn "${PN}-${PVR} installed in" - ewarn - ewarn " ${x}" - ewarn - else - # we have enough information to remove the virtual copy ourself + for x in ${my_output} ; do + [ -f ${x}/.webapp ] && . ${x}/.webapp || ewarn "Cannot find file ${x}/.webapp" + if [ "${WEB_HOSTNAME}" -a "${WEB_INSTALLDIR}" ]; then + ${WEBAPP_CONFIG} -C -h ${WEB_HOSTNAME} -d ${WEB_INSTALLDIR} + fi + done + else # don't remove anything, but warn user. bug #136959 - ${WEBAPP_CONFIG} -C -h ${WEB_HOSTNAME} -d ${WEB_INSTALLDIR} + ewarn "Don't forget to use webapp-config to remove any copies of" + ewarn "${PN}-${PVR} installed in" + ewarn - # if the removal fails - we carry on anyway! - fi - done + for x in ${my_output} ; do + [ -f ${x}/.webapp ] && . ${x}/.webapp || ewarn "Cannot find file ${x}/.webapp" + ewarn " ${x}" + done + fi } -- 2.26.2