X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=646d89c508a349193ee9ab2033af30f56098249a;hb=af60b693abaafebb13a0cbaf87b3360cdac6d352;hp=24cda1e50fd2684fc7828dfc3a59c88df44dbb7c;hpb=48dc11caafef8b296d2b7d781e2b23b12364abcb;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 24cda1e5..646d89c5 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -53,9 +53,18 @@ from dbconn import * from summarystats import SummaryStats from utils import parse_changes, check_dsc_files from textutils import fix_maintainer -from binary import Binary from lintian import parse_lintian_output, generate_reject_messages +# suppress some deprecation warnings in squeeze related to apt_pkg +# module +import warnings +warnings.filterwarnings('ignore', \ + "apt_pkg.ParseSection\(\) is deprecated. Please see apt_pkg\.TagSection\(\) for the replacement\.", \ + DeprecationWarning) +warnings.filterwarnings('ignore', \ + "Attribute 'Find' of the 'apt_pkg\.TagSection' object is deprecated, use 'find' instead\.", \ + DeprecationWarning) + ############################################################################### def get_type(f, session): @@ -856,13 +865,6 @@ class Upload(object): # Check the version and for file overwrites self.check_binary_against_db(f, session) - # Temporarily disable contents generation until we change the table storage layout - #b = Binary(f) - #b.scan_package() - #if len(b.rejects) > 0: - # for j in b.rejects: - # self.rejects.append(j) - def source_file_checks(self, f, session): entry = self.pkg.files[f] @@ -972,9 +974,11 @@ class Upload(object): # Check for packages that have moved from one component to another entry['suite'] = suite - res = get_binary_components(self.pkg.files[f]['package'], suite, entry["architecture"], session) - if res.rowcount > 0: - entry["othercomponents"] = res.fetchone()[0] + arch_list = [entry["architecture"], 'all'] + component = get_component_by_package_suite(self.pkg.files[f]['package'], \ + [suite], arch_list = arch_list, session = session) + if component is not None: + entry["othercomponents"] = component def check_files(self, action=True): file_keys = self.pkg.files.keys()