]> git.decadent.org.uk Git - dak.git/commitdiff
fix OverrideSuite handling
authorTorsten Werner <twerner@debian.org>
Sat, 28 Nov 2009 18:20:26 +0000 (19:20 +0100)
committerTorsten Werner <twerner@debian.org>
Sat, 28 Nov 2009 18:20:26 +0000 (19:20 +0100)
do it in determine_new() (queue.py) instead of do_new() (process_new.py)

Signed-off-by: Torsten Werner <twerner@debian.org>
dak/process_new.py
daklib/queue.py

index 060fa236964d539dbc2aa7ec5b49e7929f0b6513..894d07d274299363883c4561a383a1677d8c7590 100755 (executable)
@@ -611,21 +611,6 @@ def do_new(upload, session):
     # Make a copy of distribution we can happily trample on
     changes["suite"] = copy.copy(changes["distribution"])
 
-    # Fix up the list of target suites
-    for suite in changes["suite"].keys():
-        override = cnf.Find("Suite::%s::OverrideSuite" % (suite))
-        if override:
-            (olderr, newerr) = (get_suite(suite, session) == None,
-                                get_suite(override, session) == None)
-            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
-
     # The main NEW processing loop
     done = 0
     while not done:
index 5ea545fdc3ebdd45a3111b54431d25c5e0ba521d..0433a9648883163f81fe5f0d4be448ed8456bf6f 100755 (executable)
@@ -148,6 +148,22 @@ def determine_new(changes, files, warn=1):
         if f.has_key("othercomponents"):
             new[pkg]["othercomponents"] = f["othercomponents"]
 
+    # Fix up the list of target suites
+    cnf = Config()
+    for suite in changes["suite"].keys():
+        override = cnf.Find("Suite::%s::OverrideSuite" % (suite))
+        if override:
+            (olderr, newerr) = (get_suite(suite, session) == None,
+                                get_suite(override, session) == None)
+            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
+
     for suite in changes["suite"].keys():
         for pkg in new.keys():
             ql = get_override(pkg, suite, new[pkg]["component"], new[pkg]["type"], session)