]> git.decadent.org.uk Git - dak.git/commitdiff
Warn if original or overriden target suite are invalid. [ajt]
authorJames Troup <james@nocrew.org>
Sat, 20 May 2006 23:56:16 +0000 (18:56 -0500)
committerJames Troup <james@nocrew.org>
Sat, 20 May 2006 23:56:16 +0000 (18:56 -0500)
dak/process_new.py

index 45927b9cbdbd7204a37c15a889c17583a1f59e5c..094649a55da989e6815611679d1f30a1b0afeb02 100755 (executable)
@@ -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