X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_new.py;h=f15a56003f67ae82e5ec347328d94bdae8100125;hb=2ef9fe8dcf09a9be5e0119f4f7687ceb664f59cf;hp=4619df0f564cdb050edabd44a6b5267c54ce8142;hpb=94cc1127c3671302f795b49e0f69aaca760ac30b;p=dak.git diff --git a/dak/process_new.py b/dak/process_new.py index 4619df0f..f15a5600 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -54,12 +54,14 @@ import contextlib import pwd import apt_pkg, apt_inst import examine_package + from daklib import database -from daklib import logging +from daklib import daklog from daklib import queue from daklib import utils from daklib.regexes import re_no_epoch, re_default_answer, re_isanum from daklib.dak_exceptions import CantOpenError, AlreadyLockedError, CantGetLockError +from daklib.summarystats import SummaryStats # Globals Cnf = None #: Configuration, apt_pkg.Configuration @@ -552,6 +554,7 @@ def do_bxa_notification(): def add_overrides (new): changes = Upload.pkg.changes files = Upload.pkg.files + srcpkg = changes.get("source") projectB.query("BEGIN WORK") for suite in changes["suite"].keys(): @@ -561,6 +564,7 @@ def add_overrides (new): type_id = database.get_override_type_id(new[pkg]["type"]) priority_id = new[pkg]["priority id"] section_id = new[pkg]["section id"] + Logger.log(["%s overrides" % (srcpkg), suite, new[pkg]["component"], new[pkg]["type"], new[pkg]["priority"], new[pkg]["section"]]) projectB.query("INSERT INTO override (suite, component, type, package, priority, section, maintainer) VALUES (%s, %s, %s, '%s', %s, %s, '')" % (suite_id, component_id, type_id, pkg, priority_id, section_id)) for f in new[pkg]["files"]: if files[f].has_key("new"): @@ -772,7 +776,7 @@ def init(): if not Options["No-Action"]: try: - Logger = Upload.Logger = logging.Logger(Cnf, "process-new") + Logger = Upload.Logger = daklog.Logger(Cnf, "process-new") except CantOpenError, e: Options["Trainee"] = "True" @@ -1029,8 +1033,8 @@ def do_pkg(changes_file): ################################################################################ def end(): - accept_count = Upload.accept_count - accept_bytes = Upload.accept_bytes + accept_count = SummaryStats().accept_count + accept_bytes = SummaryStats().accept_bytes if accept_count: sets = "set"