Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 185231 | Differences between
and this patch

Collapse All | Expand All

(-)mod_mail.py (+15 lines)
Lines 16-21 Link Here
16
	mysubject = mysubject.replace("${PACKAGE}", cpv)
16
	mysubject = mysubject.replace("${PACKAGE}", cpv)
17
	mysubject = mysubject.replace("${HOST}", socket.getfqdn())
17
	mysubject = mysubject.replace("${HOST}", socket.getfqdn())
18
18
19
	# look at the phases listed in our logentries to figure out what action was performed
20
	action = "merged"
21
	for phase in logentries.keys():
22
		# if we found a *rm phase assume that the package was unmerged
23
		if phase in ["postrm", "prerm"]:
24
			action = "unmerged"
25
	# if we think that the package was unmerged, make sure there was no unexpected
26
	# phase recorded to avoid misinformation
27
	if action == "unmerged":
28
		for phase in logentries.keys():
29
			if phase not in ["postrm", "prerm", "other"]:
30
				action = "unknown"
31
32
	mysubject = mysubject.replace("${ACTION}", action)
33
19
	mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, fulltext)
34
	mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, fulltext)
20
	portage_mail.send_mail(mysettings, mymessage)
35
	portage_mail.send_mail(mysettings, mymessage)
21
36

Return to bug 185231