From 0d607ab20be45ec2f0c223c906be83f0fab4f376 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sat, 28 Nov 2009 19:20:26 +0100 Subject: [PATCH] fix OverrideSuite handling do it in determine_new() (queue.py) instead of do_new() (process_new.py) Signed-off-by: Torsten Werner --- dak/process_new.py | 15 --------------- daklib/queue.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/dak/process_new.py b/dak/process_new.py index 060fa236..894d07d2 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -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: diff --git a/daklib/queue.py b/daklib/queue.py index 5ea545fd..0433a964 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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) -- 2.39.5