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

Diff of /eclass/webapp.eclass

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

Revision 1.41 Revision 1.42
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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.41 2006/05/19 19:24:21 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.42 2006/06/15 07:01:01 stuart Exp $
4# 4#
5# eclass/webapp.eclass 5# eclass/webapp.eclass
6# Eclass for installing applications to run under a web server 6# Eclass for installing applications to run under a web server
7# 7#
8# Part of the implementation of GLEP #11 8# Part of the implementation of GLEP #11
376 if ! use vhosts ; then 376 if ! use vhosts ; then
377 local my_dir="${ROOT}${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}" 377 local my_dir="${ROOT}${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
378 local my_output 378 local my_output
379 379
380 if [ -d "${my_dir}" ] ; then 380 if [ -d "${my_dir}" ] ; then
381 einfo "You already have something installed in ${my_dir}"
382 einfo "Are you trying to install over the top of something I cannot upgrade?"
383
384 my_output="$(webapp_check_installedat)" 381 my_output="$(webapp_check_installedat)"
385 382
386 if [ "$?" != "0" ]; then 383 if [ "$?" != "0" ]; then
387
388 # okay, whatever is there, it isn't webapp-config-compatible 384 # okay, whatever is there, it isn't webapp-config-compatible
385 ewarn "You already have something installed in ${my_dir}"
389 ewarn 386 ewarn
390 ewarn "Whatever is in ${my_dir}, it's not" 387 ewarn "Whatever is in ${my_dir}, it's not"
391 ewarn "compatible with webapp-config." 388 ewarn "compatible with webapp-config."
392 ewarn 389 ewarn
393 ewarn "This ebuild may be overwriting important files." 390 ewarn "This ebuild may be overwriting important files."
394 ewarn 391 ewarn
395 elif [ "$(echo ${my_output} | awk '{ print $1 }')" != "${PN}" ]; then 392 elif [ "$(echo ${my_output} | awk '{ print $1 }')" != "${PN}" ]; then
396 eerror "${my_dir} contains ${my_output}" 393 eerror "${my_dir} contains ${my_output}"
397 eerror "I cannot upgrade that" 394 eerror "I cannot upgrade that"
398 die "Cannot upgrade contents of ${my_dir}" 395 die "Cannot upgrade contents of ${my_dir}"
399 else
400 einfo
401 einfo "I can upgrade the contents of ${my_dir}"
402 einfo
403 fi 396 fi
404 fi 397 fi
405 fi 398 fi
406} 399}
407 400

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20