- 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
+
+ for component_name in cnf.SubTree("Component").List():
+ component = get_component(component_name, session)
+ if not component:
+ utils.fubar('Component %s not found' % component_name)
+
+ for otype_name in cnf.ValueList("OverrideType"):
+ otype = get_override_type(otype_name, session)
+ if not otype:
+ utils.fubar('OverrideType %s not found' % otype_name)
+
+ if otype_name == "deb":
+ suffix = ""
+ elif otype_name == "udeb":
+ if component == "contrib":
+ continue # Ick2
+ suffix = ".debian-installer"
+ elif otype_name == "dsc":
+ suffix = ".src"
+
+ cname = component.component_name.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()