diff options
author | Marius Mauch <genone@gentoo.org> | 2007-07-16 12:35:32 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2007-07-16 12:35:32 +0000 |
commit | c94b9c585dc0b2433f18642b8ab02f28c4d0941a (patch) | |
tree | 260b667c701bf1526f0c96136fc5811d81cc5a24 /pym/portage/elog/mod_mail.py | |
parent | 4c16649d121dca977b3c569f03c5d1b194b635d4 (diff) | |
download | portage-c94b9c585dc0b2433f18642b8ab02f28c4d0941a.tar.gz portage-c94b9c585dc0b2433f18642b8ab02f28c4d0941a.tar.bz2 portage-c94b9c585dc0b2433f18642b8ab02f28c4d0941a.zip |
replace emerge.AtomSet with portage.sets.InternalPackageSet
svn path=/main/trunk/; revision=7279
Diffstat (limited to 'pym/portage/elog/mod_mail.py')
-rw-r--r-- | pym/portage/elog/mod_mail.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/portage/elog/mod_mail.py b/pym/portage/elog/mod_mail.py index d0d2b33ac..c9fa5b563 100644 --- a/pym/portage/elog/mod_mail.py +++ b/pym/portage/elog/mod_mail.py @@ -16,6 +16,21 @@ def process(mysettings, key, logentries, fulltext): mysubject = mysubject.replace("${PACKAGE}", key) mysubject = mysubject.replace("${HOST}", socket.getfqdn()) + # look at the phases listed in our logentries to figure out what action was performed + action = "merged" + for phase in logentries.keys(): + # if we found a *rm phase assume that the package was unmerged + if phase in ["postrm", "prerm"]: + action = "unmerged" + # if we think that the package was unmerged, make sure there was no unexpected + # phase recorded to avoid misinformation + if action == "unmerged": + for phase in logentries.keys(): + if phase not in ["postrm", "prerm", "other"]: + action = "unknown" + + mysubject = mysubject.replace("${ACTION}", action) + mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject, fulltext) portage.mail.send_mail(mysettings, mymessage) |