diff options
author | Fabio Erculiani <lxnay@gentoo.org> | 2011-07-26 19:25:19 +0000 |
---|---|---|
committer | Fabio Erculiani <lxnay@gentoo.org> | 2011-07-26 19:25:19 +0000 |
commit | 40529bcd734dadd3d640b00cf3205c9946b26567 (patch) | |
tree | 249ccc600e3e8cabe2ccdcffa17fd2097fc56343 /eclass/webapp.eclass | |
parent | Marked ~ppc wrt #357619 (diff) | |
download | historical-40529bcd734dadd3d640b00cf3205c9946b26567.tar.gz historical-40529bcd734dadd3d640b00cf3205c9946b26567.tar.bz2 historical-40529bcd734dadd3d640b00cf3205c9946b26567.zip |
if WEBAPP_OPTIONAL, do not source ETC_CONFIG if it doesn't exist
Diffstat (limited to 'eclass/webapp.eclass')
-rw-r--r-- | eclass/webapp.eclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass index ebeb340ef9df..70377c0ffcef 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.67 2011/07/12 07:48:01 lxnay Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.68 2011/07/26 19:25:19 lxnay Exp $ # @ECLASS: webapp.eclass # @MAINTAINER: @@ -59,7 +59,12 @@ webapp_read_config() { if has_version '>=app-admin/webapp-config-1.50'; then ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!" eval ${ENVVAR} - else + elif [[ "${WEBAPP_OPTIONAL}" != "yes" ]]; then + # ETC_CONFIG might not be available + . ${ETC_CONFIG} || die "Unable to read ${ETC_CONFIG}" + elif [[ -f "${ETC_CONFIG}" ]]; then + # WEBAPP_OPTIONAL is set to yes + # and this must run only if ETC_CONFIG actually exists . ${ETC_CONFIG} || die "Unable to read ${ETC_CONFIG}" fi } |