# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
q = projectB.query("SELECT l.path, f.filename, l.type, f.id FROM files f, location l WHERE (f.filename ~ '/%s$' OR f.filename = '%s') AND l.id = f.location" % (utils.regex_safe(dsc_file), dsc_file));
ql = q.getresult();
q = projectB.query("SELECT l.path, f.filename, l.type, f.id FROM files f, location l WHERE (f.filename ~ '/%s$' OR f.filename = '%s') AND l.id = f.location" % (utils.regex_safe(dsc_file), dsc_file));
ql = q.getresult();
if ql != []:
# Unfortunately, we make get more than one match
# here if, for example, the package was in potato
if ql != []:
# Unfortunately, we make get more than one match
# here if, for example, the package was in potato
override_section = files[file]["override section"];
if section != override_section and section != "-":
# Ignore this; it's a common mistake and not worth whining about
override_section = files[file]["override section"];
if section != override_section and section != "-":
# Ignore this; it's a common mistake and not worth whining about
continue;
summary = summary + "%s: section is overridden from %s to %s.\n" % (file, section, override_section);
if files[file]["type"] == "deb": # don't do priority for source
continue;
summary = summary + "%s: section is overridden from %s to %s.\n" % (file, section, override_section);
if files[file]["type"] == "deb": # don't do priority for source