+def check_override ():
+ # Only check section & priority on sourceful uploads
+ if not changes["architecture"].has_key("source"):
+ return;
+
+ summary = ""
+ for file in files.keys():
+ if not files[file].has_key("new") and (files[file]["type"] == "dsc" or files[file]["type"] == "deb"):
+ section = files[file]["section"];
+ override_section = files[file]["override section"];
+ if section != override_section and section != "-":
+ summary = summary + "%s: section is overridden from %s to %s.\n" % (file, section, override_section);
+ if files[file]["type"] == "deb": # don't do priority for source
+ priority = files[file]["priority"];
+ override_priority = files[file]["override priority"];
+ if priority != override_priority and priority != "-":
+ summary = summary + "%s: priority is overridden from %s to %s.\n" % (file, priority, override_priority);
+
+ if summary == "":
+ return;
+
+ mail_message = """Return-Path: %s
+From: %s
+To: %s
+Bcc: troup@auric.debian.org
+Subject: %s override disparity
+
+There are disparities between your recently installed upload and the
+override file for the following file(s):
+
+%s
+Either the package or the override file is incorrect. If you think
+the override is correct and the package wrong please fix the package
+so that this disparity is fixed in the next upload. If you feel the
+override is incorrect then please reply to this mail and explain why.
+
+--
+Debian distribution maintenance software
+
+(This message was generated automatically; if you believe that there
+is a problem with it please contact the archive administrators by
+mailing ftpmaster@debian.org)
+""" % (Cnf["Dinstall::MyEmailAddress"], Cnf["Dinstall::MyEmailAddress"], changes["maintainer822"], changes["source"], summary);
+ utils.send_mail (mail_message, "")
+