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

Contents of /eclass/mailer.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Mon Jan 31 13:58:12 2011 UTC (4 years, 6 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED
QA: drop all unused eclasses that were already announced for removal. New policy allows them to be gone after 30 days since the announcement.

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/mailer.eclass,v 1.16 2009/11/30 04:19:36 abcd Exp $
4
5 # @DEAD
6 # To be removed on 2011/11/30.
7 ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
8
9 EXPORT_FUNCTIONS pkg_postrm
10
11 # Gets current mailer profile
12 mailer_get_current() {
13 mailer-config --get-current-profile
14 }
15
16 # Set current mailer profile
17 mailer_set_profile() {
18 local newprofile=${1:-${P}}
19
20 ebegin "Setting the current mailer profile to \"${newprofile}\""
21 mailer-config --set-profile ${newprofile} >/dev/null || die
22 eend $?
23 }
24
25 # Wipe unused configs
26 mailer_wipe_confs() {
27 local x i
28
29 ebegin "Wiping all unused mailer profiles"
30 for x in /etc/mail/*.mailer ; do
31 i=${x##*/}
32 i=${i%.mailer}
33
34 [[ ${i} == ${P} ]] && continue
35 [[ ${i} == "default" ]] && continue
36 has_version "~mail-mta/${i}" || rm ${x}
37 done
38 eend 0
39 }
40
41 mailer_pkg_postrm() {
42 if use mailwrapper ; then
43 mailer_wipe_confs
44
45 # We are removing the current profile, switch back to default
46 [[ $(mailer_get_current) == ${P} ]] && mailer_set_profile default
47 fi
48 }

  ViewVC Help
Powered by ViewVC 1.1.20