X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Foverride.py;h=de888e55380115358c842cd94ae0d0392df57b6f;hb=18a71126d887a90fec2674a85ad2712c07cb1163;hp=75edbb580f88d11cef0e5022821b41c023c42a76;hpb=ec257c02a5d62fd27844c70814acd9616b24b4c8;p=dak.git diff --git a/dak/override.py b/dak/override.py index 75edbb58..de888e55 100755 --- a/dak/override.py +++ b/dak/override.py @@ -49,7 +49,7 @@ def usage (exit_code=0): 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 @@ -61,7 +61,7 @@ def check_override_compliance(package, priority, suite, cnf, session): 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: @@ -254,7 +254,7 @@ def main (): game_over() - Logger = daklog.Logger(cnf.Cnf, "override") + Logger = daklog.Logger("override") dsc_otype_id = get_override_type('dsc').overridetype_id @@ -286,6 +286,11 @@ def main (): 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"] @@ -296,7 +301,10 @@ def main (): 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()