- suite = suite.lower()
-
- sys.stderr.write("Processing %s...\n" % (suite));
- override_suite = Cnf["Suite::%s::OverrideCodeName" % (suite)];
- for component in Cnf.SubTree("Component").List():
- if component == "mixed":
- continue; # Ick
- for otype in Cnf.ValueList("OverrideType"):
- if otype == "deb":
- suffix = "";
- elif otype == "udeb":
- if component != "main":
- continue; # Ick2
- suffix = ".debian-installer";
- elif otype == "dsc":
- suffix = ".src";
- filename = "%s/override.%s.%s%s" % (Cnf["Dir::Override"], override_suite, component.replace("non-US/", ""), suffix);
- output_file = utils.open_file(filename, 'w');
- do_list(output_file, suite, component, otype);
- output_file.close();
+
+ sys.stderr.write("Processing %s...\n" % (suite.suite_name))
+ override_suite = suite.overridecodename or suite.codename
+
+ for component in session.query(Component).all():
+ for otype in session.query(OverrideType).all():
+ otype_name = otype.overridetype
+ cname = component.component_name
+
+ # TODO: Stick suffix info in database (or get rid of it)
+ if otype_name == "deb":
+ suffix = ""
+ elif otype_name == "udeb":
+ if cname == "contrib":
+ continue # Ick2
+ suffix = ".debian-installer"
+ elif otype_name == "dsc":
+ suffix = ".src"
+ else:
+ utils.fubar("Don't understand OverrideType %s" % otype.overridetype)
+
+ cname = cname.replace('/', '_')
+ filename = os.path.join(cnf["Dir::Override"], "override.%s.%s%s" % (override_suite, cname, suffix))
+
+ output_file = utils.open_file(filename, 'w')
+ do_list(output_file, suite, component, otype, session)
+ output_file.close()