From: James Troup Date: Sat, 20 May 2006 23:56:16 +0000 (-0500) Subject: Warn if original or overriden target suite are invalid. [ajt] X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e96a81660d4d94f4ace02484e63873e7d38b0877;p=dak.git Warn if original or overriden target suite are invalid. [ajt] --- diff --git a/dak/process_new.py b/dak/process_new.py index 45927b9c..094649a5 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -701,6 +701,14 @@ def do_new(): for suite in changes["suite"].keys(): override = Cnf.Find("Suite::%s::OverrideSuite" % (suite)) if override: + (olderr, newerr) = (daklib.database.get_suite_id(suite) == -1, + daklib.database.get_suite_id(override) == -1) + if olderr or newerr: + (oinv, newinv) = ("", "") + if olderr: oinv = "invalid " + if newerr: ninv = "invalid " + print "warning: overriding %ssuite %s to %ssuite %s" % ( + oinv, suite, ninv, override) del changes["suite"][suite] changes["suite"][override] = 1 # Validate suites