summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2009-11-30 04:19:36 +0000
committerJonathan Callen <abcd@gentoo.org>2009-11-30 04:19:36 +0000
commit919d8676c7be258c142e09e161f29a3dbe5ca490 (patch)
tree23491b364c9c55e6d81cb39ba21cd4af1a32c174 /eclass/mailer.eclass
parentDrop usage of xfce44.eclass (deprecated) (diff)
downloadgentoo-2-919d8676c7be258c142e09e161f29a3dbe5ca490.tar.gz
gentoo-2-919d8676c7be258c142e09e161f29a3dbe5ca490.tar.bz2
gentoo-2-919d8676c7be258c142e09e161f29a3dbe5ca490.zip
Remove eclasses that have been marked as deprecated for >=2 years; schedule other deprecated eclasses for removal
Diffstat (limited to 'eclass/mailer.eclass')
-rw-r--r--eclass/mailer.eclass85
1 files changed, 6 insertions, 79 deletions
diff --git a/eclass/mailer.eclass b/eclass/mailer.eclass
index 009544f4e240..63575aa4fd33 100644
--- a/eclass/mailer.eclass
+++ b/eclass/mailer.eclass
@@ -1,73 +1,16 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mailer.eclass,v 1.15 2005/08/05 08:26:34 slarti Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mailer.eclass,v 1.16 2009/11/30 04:19:36 abcd Exp $
-#
-# Original Authors: Fernando J. Pereda <ferdy@gentoo.org>
-# Tom Martin <slarti@gentoo.org>
-#
-# Purpose: eclass to intarface with net-mail/mailer-config, used to manage
-# multiple MTA's installed on a Gentoo system.
-#
-# Usage: call mailer_install_conf in src_install(), on the condition that
-# "mailwrapper" is in USE. If mailer_install_conf has no arguments,
-# ${FILESDIR}/mailer.conf will be installed to /etc/mail. If it is given a file
-# as argument, this will be used. Also, please note that there is no need to
-# IUSE="mailwrapper" or create RDEPENDS for mailwrapper as used to be the case.
-# As you can see below, these are now set by this eclass. This rule also holds
-# true for PROVIDE="virtual/mta".
-#
-##
-# Functions available for ebuilds:
-#
-# mailer_get_current() - Returns the current profile (i.e. postfix-2.2.3)
-# mailer_install_conf() - Installs the profile file in ${1} or
-# ${FILESDIR}/mailer.conf if ${1} is not specified.
-# mailer_set_profile() - Sets the current profile to ${1} or to ${P} if ${1}
-# is not specified.
-# mailer_wipe_confs() - Removes unused profiles (i.e. the profile exists but
-# the package is no longer available)
-##
+# @DEAD
+# To be removed on 2011/11/30.
+ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
-IUSE="mailwrapper"
-RDEPEND="mailwrapper? (
- || (
- net-mail/mailer-config
- app-admin/eselect
- )
- >=net-mail/mailwrapper-0.2.1-r1
- )
- !mailwrapper? (
- !virtual/mta
- )"
-PROVIDE="virtual/mta"
-
-EXPORT_FUNCTIONS pkg_postinst pkg_postrm
+EXPORT_FUNCTIONS pkg_postrm
# Gets current mailer profile
mailer_get_current() {
mailer-config --get-current-profile
- return $?
-}
-
-# Installs a new mailer.conf given as an argument, else it installs
-# ${FILESDIR}/mailer.conf
-mailer_install_conf() {
- local newname
-
- if [[ ${PN} == "mailer-config" ]] ; then
- newname="default"
- else
- newname="${1:-${P}.mailer}"
- fi
-
- # If the newfile does not exist or the version in the system
- # differs from the one in FILESDIR/ (update); install it
- if [[ ! -f /etc/mail/${newname} ]] || \
- ! diff /etc/mail/${newname} "${FILESDIR}/mailer.conf" > /dev/null ; then
- insinto /etc/mail/
- newins "${FILESDIR}/mailer.conf" ${newname}
- fi
}
# Set current mailer profile
@@ -95,22 +38,6 @@ mailer_wipe_confs() {
eend 0
}
-mailer_pkg_postinst() {
- if use mailwrapper ; then
- if [[ $(mailer_get_current) == default ]] ; then
- mailer_set_profile
- else
- einfo " "
- einfo "Use either net-mail/mailer-config or app-admin/eselect to change"
- einfo "to this mailer profile:"
- einfo " "
- einfo " mailer-config --set-profile ${P}"
- einfo " eselect mailer set ${P}"
- einfo " "
- fi
- fi
-}
-
mailer_pkg_postrm() {
if use mailwrapper ; then
mailer_wipe_confs