- override_type = ".debian-installer";
- elif type == "dsc":
- override_type = ".src";
- filename = "%s/override.%s.%s%s" % (Cnf["Dir::OverrideDir"], override_suite, string.replace(component, "non-US/", ""), override_type);
- file = utils.open_file(filename, 'w');
- sys.stdout = file;
- list(suite, component, type);
- sys.stdout.close();
-
- # Munge the override file for testing by using unstable's where
- # possible and falling back on stable's where it's not.
-
- print "Processing testing...";
- suite = "testing";
- suite_id = db_access.get_suite_id(suite);
- override_suite = Cnf["Suite::%s::OverrideCodeName" % (suite)];
- for component in Cnf.SubTree("Component").List():
- if component == "mixed":
- continue;
- component_id = db_access.get_component_id(component);
- for type in Cnf.SubTree("OverrideType").List():
- if type == "deb":
- override_type = "";
- q = projectB.query("SELECT DISTINCT b.package FROM bin_associations ba, binaries b, files f, location l WHERE ba.suite = %s AND l.component = %s AND ba.bin = b.id AND b.file = f.id AND f.location = l.id" % (suite_id, component_id));
- elif type == "dsc":
- q = projectB.query("SELECT DISTINCT s.source FROM src_associations sa, source s, files f, location l WHERE sa.suite = %s AND l.component = %s AND sa.source = s.id AND s.file = f.id AND f.location = l.id" % (suite_id, component_id));
- override_type = ".src";
- elif type == "udeb":
- continue;
- filename = "override.%s.%s%s" % (override_suite, string.replace(component, "non-US/", ""), override_type);
- file = utils.open_file(filename, 'w');
- sys.stdout = file;
- for i in q.getresult():
- package = i[0];
- if override["unstable"][component][type].has_key(package):
- print string.join(override["unstable"][component][type][package], '\t');
- elif override["stable"][component][type].has_key(package):
- print string.join(override["stable"][component][type][package], '\t');
- else:
- if type == "dsc" and (override["unstable"][component]["deb"].has_key(package) or override["stable"][component]["deb"].has_key(package)):
- continue; # source falls back on binary; so accept silently
- utils.warn("Can't find override entry for testing package '%s' (component %s, type %s)." % (package, component, type));
- sys.stdout.close();
-
-
-#######################################################################################
+ 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();