1 |
lxnay 11/07/26 19:25:19 |
2 |
|
3 |
Modified: webapp.eclass |
4 |
Log: |
5 |
if WEBAPP_OPTIONAL, do not source ETC_CONFIG if it doesn't exist |
6 |
|
7 |
Revision Changes Path |
8 |
1.68 eclass/webapp.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/webapp.eclass?rev=1.68&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/webapp.eclass?rev=1.68&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/webapp.eclass?r1=1.67&r2=1.68 |
13 |
|
14 |
Index: webapp.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v |
17 |
retrieving revision 1.67 |
18 |
retrieving revision 1.68 |
19 |
diff -u -r1.67 -r1.68 |
20 |
--- webapp.eclass 12 Jul 2011 07:48:01 -0000 1.67 |
21 |
+++ webapp.eclass 26 Jul 2011 19:25:19 -0000 1.68 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2006 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.67 2011/07/12 07:48:01 lxnay Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.68 2011/07/26 19:25:19 lxnay Exp $ |
27 |
|
28 |
# @ECLASS: webapp.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -59,7 +59,12 @@ |
31 |
if has_version '>=app-admin/webapp-config-1.50'; then |
32 |
ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!" |
33 |
eval ${ENVVAR} |
34 |
- else |
35 |
+ elif [[ "${WEBAPP_OPTIONAL}" != "yes" ]]; then |
36 |
+ # ETC_CONFIG might not be available |
37 |
+ . ${ETC_CONFIG} || die "Unable to read ${ETC_CONFIG}" |
38 |
+ elif [[ -f "${ETC_CONFIG}" ]]; then |
39 |
+ # WEBAPP_OPTIONAL is set to yes |
40 |
+ # and this must run only if ETC_CONFIG actually exists |
41 |
. ${ETC_CONFIG} || die "Unable to read ${ETC_CONFIG}" |
42 |
fi |
43 |
} |