- continue;
- override_type = ".debian-installer";
- 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 b.type = '%s' AND ba.bin = b.id AND b.file = f.id AND f.location = l.id" % (suite_id, component_id, type));
- 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";
- filename = "%s/override.%s.%s%s" % (Cnf["Dir::Override"], override_suite, component.replace("non-US/", ""), override_type);
- file = utils.open_file(filename, 'w');
- for i in q.getresult():
- package = i[0];
- if type == "deb" or type == "dsc":
- if override["unstable"][component][type].has_key(package):
- file.write(utils.result_join(override["unstable"][component][type][package])+'\n');
- elif override["stable"][component][type].has_key(package):
- file.write(utils.result_join(override["stable"][component][type][package])+'\n');
- 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));
- elif type == "udeb":
- if component == "main" and override["unstable"][component][type].has_key(package):
- file.write(utils.result_join(override["unstable"][component][type][package])+'\n');
- else:
- utils.warn("Can't find override entry for testing package '%s' (component %s, type %s)." % (package, component, type));
-
- file.close();
-
-#######################################################################################
+ 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();