X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcheck_overrides.py;h=75ba5a0e2171b880cc412108f2abf1b0869d9eba;hb=39cdc8cc1607dbacfcdbf8182e3a024c05737fe4;hp=2987f9be10978ff58a2abc22f287a92d8bfb47e7;hpb=0872b2e0b78670c91fd2bf0bda52e5761e079820;p=dak.git diff --git a/dak/check_overrides.py b/dak/check_overrides.py index 2987f9be..75ba5a0e 100755 --- a/dak/check_overrides.py +++ b/dak/check_overrides.py @@ -353,19 +353,13 @@ def main (): pass print "Processing %s%s..." % (osuite, originremark) + suiteobj = get_suite(osuite) # Get a list of all suites that use the override file of 'osuite' - ocodename = cnf["Suite::%s::codename" % osuite].lower() - suites = [] - suiteids = [] - for suite in cnf.SubTree("Suite").List(): - if ocodename == cnf["Suite::%s::OverrideCodeName" % suite].lower(): - suites.append(suite) - s = get_suite(suite.lower(), session) - if s is not None: - suiteids.append(s.suite_id) - - if len(suiteids) != len(suites) or len(suiteids) < 1: - utils.fubar("Couldn't find id's of all suites: %s" % suites) + ocodename = suiteobj.codename + suiteids = [x.suite_id for x in session.query(Suite).filter(Suite.overridecodename == ocodename).all()] + + if len(suiteids) < 1: + utils.fubar("Couldn't find id's of all suites: %s" % suiteids) for component in cnf.SubTree("Component").List(): # It is crucial for the dsc override creation based on binary @@ -374,8 +368,8 @@ def main (): otypes.remove("dsc") otypes = ["dsc"] + otypes for otype in otypes: - print "Processing %s [%s - %s] using %s..." \ - % (osuite, component, otype, suites) + print "Processing %s [%s - %s]" \ + % (osuite, component, otype) sys.stdout.flush() process(osuite, suiteids, originosuite, component, otype, session)