/[gentoo-x86]/eclass/webapp.eclass
Gentoo

Diff of /eclass/webapp.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.64 Revision 1.65
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.64 2010/05/09 22:32:16 darkside Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.65 2011/05/19 12:03:41 scarabeus Exp $
4 4
5# @ECLASS: webapp.eclass 5# @ECLASS: webapp.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# web-apps@gentoo.org 7# web-apps@gentoo.org
8# @BLURB: functions for installing applications to run under a web server 8# @BLURB: functions for installing applications to run under a web server
9# @DESCRIPTION: 9# @DESCRIPTION:
10# The webapp eclass contains functions to handle web applications with 10# The webapp eclass contains functions to handle web applications with
11# webapp-config. Part of the implementation of GLEP #11 11# webapp-config. Part of the implementation of GLEP #11
12 12
13# @ECLASS-VARIABLE: WABAPP_MINIMAL
14# @DESCRIPTION:
15# Minimal version of webapp-config the package requires for sucessfull install.
16: ${WEBAPP_MINIMAL:=1.50.15}
17
13# @ECLASS-VARIABLE: WEBAPP_DEPEND 18# @ECLASS-VARIABLE: WEBAPP_DEPEND
14# @DESCRIPTION: 19# @DESCRIPTION:
15# An ebuild should use WEBAPP_DEPEND if a custom DEPEND needs to be built, most 20# An ebuild should use WEBAPP_DEPEND if a custom DEPEND needs to be built, most
16# notably in combination with WEBAPP_OPTIONAL. 21# notably in combination with WEBAPP_OPTIONAL.
17WEBAPP_DEPEND=">=app-admin/webapp-config-1.50.15" 22: ${WEBAPP_DEPEND:=">=app-admin/webapp-config-${WEBAPP_MINIMAL}"}
18 23
19# @ECLASS-VARIABLE: WEBAPP_NO_AUTO_INSTALL 24# @ECLASS-VARIABLE: WEBAPP_AUTO_INSTALL
20# @DESCRIPTION: 25# @DESCRIPTION:
21# An ebuild sets this to `yes' if an automatic installation and/or upgrade is 26# An ebuild sets this to `no' if an automatic installation and/or upgrade is
22# not possible. The ebuild should overwrite pkg_postinst() and explain the 27# not possible. The ebuild should overwrite pkg_postinst() and explain the
23# reason for this BEFORE calling webapp_pkg_postinst(). 28# reason for this BEFORE calling webapp_pkg_postinst().
29: ${WEBAPP_AUTO_INSTALL:=yes}
30if [[ -n ${WEBAPP_NO_AUTO_INSTALL} ]]; then
31 WEBAPP_AUTO_INSTALL=no
32 ewarn "QA: using deprecated variable \"WEBAPP_NO_AUTO_INSTALL\"."
33 ewarn "QA: please migrate to WEBAPP_AUTO_INSTALL with inverse logic"
34 ewarn "QA: that defaults to yes."
35fi
24 36
25# @ECLASS-VARIABLE: WEBAPP_OPTIONAL 37# @ECLASS-VARIABLE: WEBAPP_OPTIONAL
26# @DESCRIPTION: 38# @DESCRIPTION:
27# An ebuild sets this to `yes' to make webapp support optional, in which case 39# An ebuild sets this to `yes' to make webapp support optional, in which case
28# you also need to take care of USE-flags and dependencies. 40# you also need to take care of USE-flags and dependencies.
29
30if [[ "${WEBAPP_OPTIONAL}" != "yes" ]]; then 41if [[ ${WEBAPP_OPTIONAL} != yes ]]; then
31 [[ "${WEBAPP_NO_AUTO_INSTALL}" == "yes" ]] || IUSE="vhosts" 42 [[ ${WEBAPP_AUTO_INSTALL} == yes ]] && IUSE="vhosts"
32 SLOT="${PVR}" 43 : ${SLOT:=${PVR}}
33 DEPEND="${WEBAPP_DEPEND}" 44 DEPEND="${WEBAPP_DEPEND}"
34 RDEPEND="${DEPEND}" 45 RDEPEND="${DEPEND}"
35fi 46fi
36 47
37EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm 48EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm
54# Load the config file /etc/vhosts/webapp-config 65# Load the config file /etc/vhosts/webapp-config
55# Supports both the old bash version, and the new python version 66# Supports both the old bash version, and the new python version
56webapp_read_config() { 67webapp_read_config() {
57 debug-print-function $FUNCNAME $* 68 debug-print-function $FUNCNAME $*
58 69
59 if has_version '>=app-admin/webapp-config-1.50'; then
60 ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!" 70 ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!"
61 eval ${ENVVAR} 71 eval ${ENVVAR} || die
62 else
63 . ${ETC_CONFIG} || die "Unable to read ${ETC_CONFIG}"
64 fi
65} 72}
66 73
67# Check whether a specified file exists in the given directory (`.' by default) 74# Check whether a specified file exists in the given directory (`.' by default)
68webapp_checkfileexists() { 75webapp_checkfileexists() {
69 debug-print-function $FUNCNAME $* 76 debug-print-function $FUNCNAME $*
70 77
71 local my_prefix=${2:+${2}/} 78 local msg my_prefix=${2:+${2}/}
72 79
73 if [[ ! -e "${my_prefix}${1}" ]]; then 80 if [[ ! -e "${my_prefix}${1}" ]]; then
74 msg="ebuild fault: file '${1}' not found" 81 msg="ebuild error: file '${1}' not found"
75 eerror "$msg" 82 eerror "$msg"
76 eerror "Please report this as a bug at http://bugs.gentoo.org/" 83 eerror "Please report this as a bug at http://bugs.gentoo.org/"
77 die "$msg" 84 die "$msg"
78 fi 85 fi
79} 86}
99} 106}
100 107
101webapp_getinstalltype() { 108webapp_getinstalltype() {
102 debug-print-function $FUNCNAME $* 109 debug-print-function $FUNCNAME $*
103 110
111 local my_output my_pn my_pvr
112
104 if ! has vhosts ${IUSE} || use vhosts; then 113 if ! has vhosts ${IUSE} || use vhosts; then
105 return 114 return
106 fi 115 fi
107 116
108 local my_output
109 my_output="$(webapp_check_installedat)" 117 my_output="$(webapp_check_installedat)"
110 118
111 if [[ $? -eq 0 ]]; then 119 if [[ $? -eq 0 ]]; then
112 # something is already installed there 120 # something is already installed there
113 # make sure it isn't the same version 121 # make sure it isn't the same version
114 122
115 local my_pn="$(echo ${my_output} | awk '{ print $1 }')" 123 my_pn="$(echo ${my_output} | awk '{ print $1 }')"
116 local my_pvr="$(echo ${my_output} | awk '{ print $2 }')" 124 my_pvr="$(echo ${my_output} | awk '{ print $2 }')"
117 125
118 REMOVE_PKG="${my_pn}-${my_pvr}" 126 REMOVE_PKG="${my_pn}-${my_pvr}"
119 127
120 if [[ "${my_pn}" == "${PN}" ]]; then 128 if [[ "${my_pn}" == "${PN}" ]]; then
121 if [[ "${my_pvr}" != "${PVR}" ]]; then 129 if [[ "${my_pvr}" != "${PVR}" ]]; then
131 else 139 else
132 elog "This is an installation" 140 elog "This is an installation"
133 fi 141 fi
134} 142}
135 143
144# helper for webapp_serverowned()
145_webapp_serverowned() {
146 debug-print-function $FUNCNAME $*
147
148 webapp_checkfileexists "${1}" "${D}"
149 local my_file="$(webapp_strip_appdir "${1}")"
150 my_file="$(webapp_strip_cwd "${my_file}")"
151
152 elog "(server owned) ${my_file}"
153 echo "${my_file}" >> "${D}/${WA_SOLIST}"
154}
155
136# ============================================================================== 156# ==============================================================================
137# PUBLIC FUNCTIONS 157# PUBLIC FUNCTIONS
138# ============================================================================== 158# ==============================================================================
139 159
140# @FUNCTION: need_httpd 160# @FUNCTION: need_httpd
169# @DESCRIPTION: 189# @DESCRIPTION:
170# Mark a file config-protected for a web-based application. 190# Mark a file config-protected for a web-based application.
171webapp_configfile() { 191webapp_configfile() {
172 debug-print-function $FUNCNAME $* 192 debug-print-function $FUNCNAME $*
173 193
194 [[ $# -lt 1 ]] && die "${FUNCNAME}: I require at least 1 argument. Please read eclass documentation."
195
174 local m 196 local m
175 for m in "$@"; do 197 for m in "$@"; do
176 webapp_checkfileexists "${m}" "${D}" 198 webapp_checkfileexists "${m}" "${D}"
177 199
178 local my_file="$(webapp_strip_appdir "${m}")" 200 local my_file="$(webapp_strip_appdir "${m}")"
179 my_file="$(webapp_strip_cwd "${my_file}")" 201 my_file="$(webapp_strip_cwd "${my_file}")"
180 202
181 elog "(config) ${my_file}" 203 elog "[webapp-config] ${my_file}"
182 echo "${my_file}" >> ${D}/${WA_CONFIGLIST} 204 echo "${my_file}" >> ${D}/${WA_CONFIGLIST}
183 done 205 done
184} 206}
185 207
186# @FUNCTION: webapp_hook_script 208# @FUNCTION: webapp_hook_script
187# @USAGE: <file> 209# @USAGE: <file> [more files ...]
188# @DESCRIPTION: 210# @DESCRIPTION:
189# Install a script that will run after a virtual copy is created, and 211# Install a script that will run after a virtual copy is created, and
190# before a virtual copy has been removed. 212# before a virtual copy has been removed.
191webapp_hook_script() { 213webapp_hook_script() {
192 debug-print-function $FUNCNAME $* 214 debug-print-function $FUNCNAME $*
193 215
216 [[ $# -lt 1 ]] && die "${FUNCNAME}: I require at least 1 argument. Please read eclass documentation."
217
218 local m
219 for m in "$@"; do
194 webapp_checkfileexists "${1}" 220 webapp_checkfileexists "${m}"
195 221
196 elog "(hook) ${1}" 222 elog "[webapp-hook] ${m}"
197 cp "${1}" "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" || die "Unable to install ${1} into ${D}/${MY_HOOKSCRIPTSDIR}/" 223 cp "${1}" "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" || die "Unable to install ${1} into \"${D}/${MY_HOOKSCRIPTSDIR}/\""
198 chmod 555 "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")" 224 chmod 555 "${D}/${MY_HOOKSCRIPTSDIR}/$(basename "${1}")"
225 done
199} 226}
200 227
201# @FUNCTION: webapp_postinst_txt 228# @FUNCTION: webapp_postinst_txt
202# @USAGE: <lang> <file> 229# @USAGE: <lang> <file> [more files ...]
203# @DESCRIPTION: 230# @DESCRIPTION:
204# Install a text file containing post-installation instructions. 231# Install a text file containing post-installation instructions.
205webapp_postinst_txt() { 232webapp_postinst_txt() {
206 debug-print-function $FUNCNAME $* 233 debug-print-function $FUNCNAME $*
207 234
235 local lang m
236
237 [[ $# -lt 2 ]] && die "${FUNCNAME}: I require at least 2 arguments. Please read eclass documentation."
238
239 lang=${1}
240 shift
241
242 local m
243 for m in "$@"; do
208 webapp_checkfileexists "${2}" 244 webapp_checkfileexists "${m}"
209 245
210 elog "(info) ${2} (lang: ${1})" 246 elog "[webapp-info] \"${m}\" (lang: ${lang})"
211 cp "${2}" "${D}/${MY_APPDIR}/postinst-${1}.txt" 247 cp "${m}" "${D}/${MY_APPDIR}/${m}-postinst-${lang}.txt" || die
248 done
212} 249}
213 250
214# @FUNCTION: webapp_postupgrade_txt 251# @FUNCTION: webapp_postupgrade_txt
215# @USAGE: <lang> <file> 252# @USAGE: <lang> <file> [more files ...]
216# @DESCRIPTION: 253# @DESCRIPTION:
217# Install a text file containing post-upgrade instructions. 254# Install a text file containing post-upgrade instructions.
218webapp_postupgrade_txt() { 255webapp_postupgrade_txt() {
219 debug-print-function $FUNCNAME $* 256 debug-print-function $FUNCNAME $*
220 257
258 local lang m
259
260 [[ $# -lt 2 ]] && die "${FUNCNAME}: I require at least 2 arguments. Please read eclass documentation."
261
262 lang=${1}
263 shift
264
265 local m
266 for m in "$@"; do
221 webapp_checkfileexists "${2}" 267 webapp_checkfileexists "${m}"
222 268
223 elog "(info) ${2} (lang: ${1})" 269 elog "[webapp-info] \"${m}\" (lang: ${lang})"
224 cp "${2}" "${D}/${MY_APPDIR}/postupgrade-${1}.txt" 270 cp "${m}" "${D}/${MY_APPDIR}/${m}-postupgrade-${lang}.txt" || die
225} 271 done
226
227# helper for webapp_serverowned()
228_webapp_serverowned() {
229 debug-print-function $FUNCNAME $*
230
231 webapp_checkfileexists "${1}" "${D}"
232 local my_file="$(webapp_strip_appdir "${1}")"
233 my_file="$(webapp_strip_cwd "${my_file}")"
234
235 elog "(server owned) ${my_file}"
236 echo "${my_file}" >> "${D}/${WA_SOLIST}"
237} 272}
238 273
239# @FUNCTION: webapp_serverowned 274# @FUNCTION: webapp_serverowned
240# @USAGE: [-R] <file> [more files ...] 275# @USAGE: [-R] <file> [more files ...]
241# @DESCRIPTION: 276# @DESCRIPTION:
269# used by default. Note: this function will automagically prepend $1 to the 304# used by default. Note: this function will automagically prepend $1 to the
270# front of your config file's name. 305# front of your config file's name.
271webapp_server_configfile() { 306webapp_server_configfile() {
272 debug-print-function $FUNCNAME $* 307 debug-print-function $FUNCNAME $*
273 308
309 [[ $# -lt 2 ]] && die "${FUNCNAME}: I require at least 2 arguments. Please read eclass documentation."
310
274 webapp_checkfileexists "${2}" 311 webapp_checkfileexists "${2}"
275 312
276 # WARNING: 313 # WARNING:
277 # 314 #
278 # do NOT change the naming convention used here without changing all 315 # do NOT change the naming convention used here without changing all
279 # the other scripts that also rely upon these names 316 # the other scripts that also rely upon these names
280 317
281 local my_file="${1}-${3:-$(basename "${2}")}" 318 local my_file="${1}-${3:-$(basename "${2}")}"
282 319
283 elog "(${1}) config file '${my_file}'" 320 elog "[webapp] Server \"${1}\" config file \"${my_file}\""
284 cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}" 321 cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}"
285} 322}
286 323
287# @FUNCTION: webapp_sqlscript 324# @FUNCTION: webapp_sqlscript
288# @USAGE: <db> <file> [version] 325# @USAGE: <db> <file> [version]
292# If a version is given the script should upgrade the database schema from 329# If a version is given the script should upgrade the database schema from
293# the given version to $PVR. 330# the given version to $PVR.
294webapp_sqlscript() { 331webapp_sqlscript() {
295 debug-print-function $FUNCNAME $* 332 debug-print-function $FUNCNAME $*
296 333
334 [[ $# -lt 2 ]] && die "${FUNCNAME}: I require at least 2 arguments. Please read eclass documentation."
335
297 webapp_checkfileexists "${2}" 336 webapp_checkfileexists "${2}"
298
299 dodir "${MY_SQLSCRIPTSDIR}/${1}"
300 337
301 # WARNING: 338 # WARNING:
302 # 339 #
303 # do NOT change the naming convention used here without changing all 340 # do NOT change the naming convention used here without changing all
304 # the other scripts that also rely upon these names 341 # the other scripts that also rely upon these names
305 342
343 insinto "${MY_SQLSCRIPTSDIR}/${1}"
344 insopts -m0600
306 if [[ -n "${3}" ]]; then 345 if [[ -n ${3} ]]; then
307 elog "(${1}) upgrade script for ${PN}-${3} to ${PVR}" 346 elog "[webapp] DB: \"${1}\" upgrade script for ${PN}-${3} to ${PVR}"
308 cp "${2}" "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" 347 newins "${2}" "${3}_to_${PVR}.sql" || die
309 chmod 600 "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql"
310 else 348 else
311 elog "(${1}) create script for ${PN}-${PVR}" 349 elog "[webapp] DB: \"${1}\" create script for ${PN}-${PVR}"
312 cp "${2}" "${D}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql" 350 newins "${2}" "${PVR}_create.sql"
313 chmod 600 "${D}/${MY_SQLSCRIPTSDIR}/${1}/${PVR}_create.sql"
314 fi 351 fi
315} 352}
316 353
317# @FUNCTION: webapp_src_preinst 354# @FUNCTION: webapp_src_preinst
318# @DESCRIPTION: 355# @DESCRIPTION:
320# For now we just create required webapp-config directories. 357# For now we just create required webapp-config directories.
321webapp_src_preinst() { 358webapp_src_preinst() {
322 debug-print-function $FUNCNAME $* 359 debug-print-function $FUNCNAME $*
323 360
324 # sanity checks, to catch bugs in the ebuild 361 # sanity checks, to catch bugs in the ebuild
325 if [[ ! -f "${T}/${SETUP_CHECK_FILE}" ]]; then 362 if [[ ! -f ${T}/${SETUP_CHECK_FILE} ]]; then
326 eerror 363 eerror
327 eerror "This ebuild did not call webapp_pkg_setup() at the beginning" 364 eerror "This ebuild did not call webapp_pkg_setup() at the beginning"
328 eerror "of the pkg_setup() function" 365 eerror "of the pkg_setup() function"
329 eerror 366 eerror
330 eerror "Please log a bug on http://bugs.gentoo.org" 367 eerror "Please log a bug on http://bugs.gentoo.org"
369 # no longer rely on Portage calling both webapp_pkg_setup() and 406 # no longer rely on Portage calling both webapp_pkg_setup() and
370 # webapp_src_install() within the same shell process 407 # webapp_src_install() within the same shell process
371 touch "${T}/${SETUP_CHECK_FILE}" 408 touch "${T}/${SETUP_CHECK_FILE}"
372 409
373 # special case - some ebuilds *do* need to overwride the SLOT 410 # special case - some ebuilds *do* need to overwride the SLOT
374 if [[ "${SLOT}+" != "${PVR}+" && "${WEBAPP_MANUAL_SLOT}" != "yes" ]]; then 411 [[ ${SLOT} != ${PVR} && ${WEBAPP_MANUAL_SLOT} != yes ]] && \
375 die "Set WEBAPP_MANUAL_SLOT=\"yes\" if you need to SLOT manually" 412 die "Set WEBAPP_MANUAL_SLOT=\"yes\" if you need to SLOT manually"
376 fi
377 413
378 # pull in the shared configuration file 414 # pull in the shared configuration file
379 G_HOSTNAME="localhost" 415 G_HOSTNAME="localhost"
380 webapp_read_config 416 webapp_read_config
381 417
389 local my_output 425 local my_output
390 my_output="$(webapp_check_installedat)" 426 my_output="$(webapp_check_installedat)"
391 427
392 if [[ $? -ne 0 ]]; then 428 if [[ $? -ne 0 ]]; then
393 # okay, whatever is there, it isn't webapp-config-compatible 429 # okay, whatever is there, it isn't webapp-config-compatible
394 echo
395 ewarn 430 ewarn
396 ewarn "You already have something installed in ${my_dir}" 431 ewarn "You already have something installed in ${my_dir}"
397 ewarn 432 ewarn
398 ewarn "Whatever is in ${my_dir}, it's not" 433 ewarn "Whatever is in \"${my_dir}\", it's not"
399 ewarn "compatible with webapp-config." 434 ewarn "compatible with webapp-config."
400 ewarn 435 ewarn
401 ewarn "This ebuild may be overwriting important files." 436 ewarn "This ebuild may be overwriting important files."
402 ewarn 437 ewarn
403 echo
404 ebeep 10
405 elif [[ "$(echo ${my_output} | awk '{ print $1 }')" != "${PN}" ]]; then 438 elif [[ "$(echo ${my_output} | awk '{ print $1 }')" != "${PN}" ]]; then
406 echo 439 echo
407 eerror "You already have ${my_output} installed in ${my_dir}" 440 eerror "You already have ${my_output} installed in ${my_dir}"
408 eerror 441 eerror
409 eerror "I cannot upgrade a different application" 442 eerror "I cannot upgrade a different application"
410 eerror 443 eerror
411 echo 444 echo
412 die "Cannot upgrade contents of ${my_dir}" 445 die "Cannot upgrade contents of ${my_dir}"
413 fi 446 fi
414
415} 447}
416 448
417# @FUNCTION: webapp_src_install 449# @FUNCTION: webapp_src_install
418# @DESCRIPTION: 450# @DESCRIPTION:
419# This is the default src_install(). For now, we just make sure that root owns 451# This is the default src_install(). For now, we just make sure that root owns
477 webapp_read_config 509 webapp_read_config
478 510
479 local my_mode=-I 511 local my_mode=-I
480 webapp_getinstalltype 512 webapp_getinstalltype
481 513
482 if [[ "${IS_REPLACE}" == "1" ]]; then 514 if [[ ${IS_REPLACE} == 1 ]]; then
483 elog "${PN}-${PVR} is already installed - replacing" 515 elog "[webapp] ${PN}-${PVR} is already installed - replacing"
484 my_mode=-I
485 elif [[ "${IS_UPGRADE}" == "1" ]]; then 516 elif [[ ${IS_UPGRADE} == 1 ]]; then
486 elog "${REMOVE_PKG} is already installed - upgrading" 517 elog "[webapp] ${REMOVE_PKG} is already installed - upgrading"
487 my_mode=-U 518 my_mode=-U
488 else 519 else
489 elog "${PN}-${PVR} is not installed - using install mode" 520 elog "[webapp] ${PN}-${PVR} is not installed - using install mode"
490 fi 521 fi
491 522
492 my_cmd="${WEBAPP_CONFIG} ${my_mode} -h localhost -u root -d ${INSTALL_DIR} ${PN} ${PVR}" 523 my_cmd="${WEBAPP_CONFIG} ${my_mode} -h localhost -u root -d ${INSTALL_DIR} ${PN} ${PVR}"
493 elog "Running ${my_cmd}" 524 elog "[webapp] Running ${my_cmd}"
494 ${my_cmd} 525 ${my_cmd}
495 526
496 echo 527 echo
497 local cleaner="${WEBAPP_CLEANER} -p -C ${PN}" 528 local cleaner="${WEBAPP_CLEANER} -p -C ${PN}"
498 einfo "Running ${cleaner}" 529 einfo "[webapp] Running ${cleaner}"
499 ${cleaner} 530 ${cleaner}
500 else 531 else
501 elog 532 elog
502 elog "The 'vhosts' USE flag is switched ON" 533 elog "The 'vhosts' USE flag is switched ON"
503 elog "This means that Portage will not automatically run webapp-config to" 534 elog "This means that Portage will not automatically run webapp-config to"
542 . "${x}"/.webapp 573 . "${x}"/.webapp
543 if [[ -n "${WEB_HOSTNAME}" && -n "${WEB_INSTALLDIR}" ]]; then 574 if [[ -n "${WEB_HOSTNAME}" && -n "${WEB_INSTALLDIR}" ]]; then
544 ${WEBAPP_CONFIG} -C -h ${WEB_HOSTNAME} -d ${WEB_INSTALLDIR} 575 ${WEBAPP_CONFIG} -C -h ${WEB_HOSTNAME} -d ${WEB_INSTALLDIR}
545 fi 576 fi
546 else 577 else
547 ewarn "Cannot find file ${x}/.webapp" 578 ewarn "[webapp] Cannot find file ${x}/.webapp"
548 fi 579 fi
549 done 580 done
550 elif [[ "${my_output}" != "" ]]; then 581 elif [[ -n ${my_output} ]]; then
551 echo 582 echo
552 ewarn 583 ewarn
553 ewarn "Don't forget to use webapp-config to remove any copies of" 584 ewarn "Don't forget to use webapp-config to remove any copies of"
554 ewarn "${PN}-${PVR} installed in" 585 ewarn "${PN}-${PVR} installed in"
555 ewarn 586 ewarn
556 587
557 echo "${my_output}" | while read x; do 588 echo "${my_output}" | while read x; do
558 if [[ -f "${x}"/.webapp ]]; then 589 if [[ -f "${x}"/.webapp ]]; then
559 ewarn " ${x}" 590 ewarn "[webapp] ${x}"
560 else 591 else
561 ewarn "Cannot find file ${x}/.webapp" 592 ewarn "[webapp] Cannot find file ${x}/.webapp"
562 fi 593 fi
563 done 594 done
564 595
565 ewarn 596 ewarn
566 echo 597 echo

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

  ViewVC Help
Powered by ViewVC 1.1.20