X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_new.py;h=3800fc8e1d67d173b0f5ffde75e90ce3b8e88247;hb=c4ba3eda74e1600b823f2bd2c7afe15dc679f9e7;hp=a7da65c3c874434228fbd4588bb816009a6d41ad;hpb=7d1460ab39358dd20532eb6f1f17a7d965ef9cc6;p=dak.git diff --git a/dak/process_new.py b/dak/process_new.py index a7da65c3..3800fc8e 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -552,6 +552,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 +562,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"): @@ -676,7 +678,7 @@ def do_new(): print "W: [!] marked entries must be fixed before package can be processed." if note: print "W: note must be removed before package can be processed." - prompt += "Remove note, " + prompt += "RemOve all notes, Remove note, " prompt += "Edit overrides, Check, Manual reject, Note edit, Prod, [S]kip, Quit ?" @@ -691,6 +693,7 @@ def do_new(): try: check_daily_lock() done = add_overrides (new) + Logger.log([utils.getusername(), "NEW ACCEPT: %s" % (Upload.pkg.changes_file)]) except CantGetLockError: print "Hello? Operator! Give me the number for 911!" print "Dinstall in the locked area, cant process packages, come back later" @@ -703,16 +706,22 @@ def do_new(): reject_message=Options["Manual-Reject"], note=database.get_new_comments(changes.get("source", ""))) if not aborted: + Logger.log([utils.getusername(), "NEW REJECT: %s" % (Upload.pkg.changes_file)]) os.unlink(Upload.pkg.changes_file[:-8]+".dak") done = 1 elif answer == 'N': edit_note(database.get_new_comments(changes.get("source", ""))) elif answer == 'P' and not Options["Trainee"]: prod_maintainer(database.get_new_comments(changes.get("source", ""))) + Logger.log([utils.getusername(), "NEW PROD: %s" % (Upload.pkg.changes_file)]) elif answer == 'R' and not Options["Trainee"]: confirm = utils.our_raw_input("Really clear note (y/N)? ").lower() if confirm == "y": database.delete_new_comments(changes.get("source"), changes.get("version")) + elif answer == 'O' and not Options["Trainee"]: + confirm = utils.our_raw_input("Really clear all notes (y/N)? ").lower() + if confirm == "y": + database.delete_all_new_comments(changes.get("source")) elif answer == 'S': done = 1 elif answer == 'Q': @@ -817,10 +826,12 @@ def do_byhand(): done = 1 for f in byhand: del files[f] + Logger.log([utils.getusername(), "BYHAND ACCEPT: %s" % (Upload.pkg.changes_file)]) except CantGetLockError: print "Hello? Operator! Give me the number for 911!" print "Dinstall in the locked area, cant process packages, come back later" elif answer == 'M': + Logger.log([utils.getusername(), "BYHAND REJECT: %s" % (Upload.pkg.changes_file)]) Upload.do_reject(1, Options["Manual-Reject"]) os.unlink(Upload.pkg.changes_file[:-8]+".dak") done = 1 @@ -923,10 +934,12 @@ def do_accept_stableupdate(suite, q): # writing this means that it is installed, so put it into # accepted. print "Binary-only upload, source installed." + Logger.log([utils.getusername(), "PUNEW ACCEPT: %s" % (Upload.pkg.changes_file)]) _accept() elif is_source_in_queue_dir(Cnf["Dir::Queue::Accepted"]): # The source is in accepted, the binary cleared NEW: accept it. print "Binary-only upload, source in accepted." + Logger.log([utils.getusername(), "PUNEW ACCEPT: %s" % (Upload.pkg.changes_file)]) _accept() elif is_source_in_queue_dir(Cnf["Dir::Queue::New"]): # It's in NEW. We expect the source to land in p-u holding @@ -936,6 +949,7 @@ def do_accept_stableupdate(suite, q): elif is_source_in_queue_dir(Cnf["Dir::Queue::Newstage"]): # It's in newstage. Accept into the holding area print "Binary-only upload, source in newstage." + Logger.log([utils.getusername(), "PUNEW ACCEPT: %s" % (Upload.pkg.changes_file)]) _accept() else: # No case applicable. Bail out. Return will cause the upload @@ -1025,7 +1039,7 @@ def end(): if accept_count > 1: sets = "sets" sys.stderr.write("Accepted %d package %s, %s.\n" % (accept_count, sets, utils.size_type(int(accept_bytes)))) - Logger.log(["total",accept_count,accept_bytes]) + Logger.log([utils.getusername(), "total",accept_count,accept_bytes]) if not Options["No-Action"] and not Options["Trainee"]: Logger.close()