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 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
- database.add_new_comment(Upload.pkg.changes["source"], Upload.pkg.changes["version"], newnote, utils.whoami())
+
+ database.add_new_comment(Upload.pkg.changes["source"], Upload.pkg.changes["version"], newnote, utils.whoami(), bool(Options["Trainee"]))
type_id = database.get_override_type_id(new[pkg]["type"])
priority_id = new[pkg]["priority id"]
section_id = new[pkg]["section id"]
type_id = database.get_override_type_id(new[pkg]["type"])
priority_id = new[pkg]["priority id"]
section_id = new[pkg]["section id"]
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"):
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"):
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."
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 += "Edit overrides, Check, Manual reject, Note edit, Prod, [S]kip, Quit ?"
prompt += "Edit overrides, Check, Manual reject, Note edit, Prod, [S]kip, Quit ?"
except CantGetLockError:
print "Hello? Operator! Give me the number for 911!"
print "Dinstall in the locked area, cant process packages, come back later"
except CantGetLockError:
print "Hello? Operator! Give me the number for 911!"
print "Dinstall in the locked area, cant process packages, come back later"
reject_message=Options["Manual-Reject"],
note=database.get_new_comments(changes.get("source", "")))
if not aborted:
reject_message=Options["Manual-Reject"],
note=database.get_new_comments(changes.get("source", "")))
if not aborted:
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", "")))
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", "")))
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 == '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"))
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':
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':
Upload.do_reject(1, Options["Manual-Reject"])
os.unlink(Upload.pkg.changes_file[:-8]+".dak")
done = 1
Upload.do_reject(1, Options["Manual-Reject"])
os.unlink(Upload.pkg.changes_file[:-8]+".dak")
done = 1
# writing this means that it is installed, so put it into
# accepted.
print "Binary-only upload, source installed."
# writing this means that it is installed, so put it into
# accepted.
print "Binary-only upload, source installed."
_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."
_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."
_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
_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
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."
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."
if accept_count:
sets = "set"
if accept_count > 1:
sets = "sets"
sys.stderr.write("Accepted %d package %s, %s.\n" % (accept_count, sets, utils.size_type(int(accept_bytes))))
if accept_count:
sets = "set"
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])