Make microchanges or microqueries of the binary overrides
-h, --help show this help and exit
- -c, --check chech override compliance
+ -c, --check check override compliance
-d, --done=BUG# send priority/section change as closure to bug#
-n, --no-action don't do anything
-s, --suite specify the suite to use
depends = set()
rdepends = set()
- components = cnf.ValueList("Suite::%s::Components" % suite)
+ components = get_component_names(session)
arches = set([x.arch_string for x in get_suite_architectures(suite)])
arches -= set(["source", "all"])
for arch in arches:
if not cnf.has_key("Override::Options::Suite"):
cnf["Override::Options::Suite"] = "unstable"
- arguments = apt_pkg.ParseCommandLine(cnf.Cnf, Arguments, sys.argv)
- Options = cnf.SubTree("Override::Options")
+ arguments = apt_pkg.parse_commandline(cnf.Cnf, Arguments, sys.argv)
+ Options = cnf.subtree("Override::Options")
if Options["Help"]:
usage()
game_over()
- Logger = daklog.Logger(cnf.Cnf, "override")
+ Logger = daklog.Logger("override")
dsc_otype_id = get_override_type('dsc').overridetype_id
session.commit()
if Options.has_key("Done"):
+ if not cnf.has_key("Dinstall::BugServer"):
+ utils.warn("Asked to send Done message but Dinstall::BugServer is not configured")
+ Logger.close()
+ return
+
Subst = {}
Subst["__OVERRIDE_ADDRESS__"] = cnf["Dinstall::MyEmailAddress"]
Subst["__BUG_SERVER__"] = cnf["Dinstall::BugServer"]
bcc = []
- if cnf.Find("Dinstall::Bcc") != "":
+ if cnf.find("Dinstall::Bcc") != "":
bcc.append(cnf["Dinstall::Bcc"])
if bcc:
Subst["__BCC__"] = "Bcc: " + ", ".join(bcc)
else:
Subst["__BCC__"] = "X-Filler: 42"
- Subst["__CC__"] = "Cc: " + package + "@" + cnf["Dinstall::PackagesServer"] + "\nX-DAK: dak override"
+ if cnf.has_key("Dinstall::PackagesServer"):
+ Subst["__CC__"] = "Cc: " + package + "@" + cnf["Dinstall::PackagesServer"] + "\nX-DAK: dak override"
+ else:
+ Subst["__CC__"] = "X-DAK: dak override"
Subst["__ADMIN_ADDRESS__"] = cnf["Dinstall::MyAdminAddress"]
Subst["__DISTRO__"] = cnf["Dinstall::MyDistribution"]
Subst["__WHOAMI__"] = utils.whoami()