From: Ansgar Burchardt Date: Fri, 11 Nov 2011 21:11:06 +0000 (+0000) Subject: Adapt to changes to Package-List field. X-Git-Tag: debian-r/squeeze~56^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f4a53b256d1295d471569af5d66401401cf78cc8;p=dak.git Adapt to changes to Package-List field. --- diff --git a/daklib/queue.py b/daklib/queue.py index f6593394..b7c2249e 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -51,7 +51,7 @@ from holding import Holding from urgencylog import UrgencyLog from dbconn import * from summarystats import SummaryStats -from utils import parse_changes, check_dsc_files, build_package_set +from utils import parse_changes, check_dsc_files, build_package_list from textutils import fix_maintainer from lintian import parse_lintian_output, generate_reject_messages from contents import UnpackedSource @@ -133,8 +133,8 @@ def determine_new(filename, changes, files, warn=1, session = None, dsc = None, # Try to get the Package-Set field from an included .dsc file (if possible). if dsc: - for package, entry in build_package_set(dsc, session).items(): - if not new.has_key(package): + for package, entry in build_package_list(dsc, session).items(): + if package not in new: new[package] = entry # Build up a list of potentially new things diff --git a/daklib/utils.py b/daklib/utils.py index c144624a..5e702b04 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -577,39 +577,28 @@ def build_file_list(changes, is_a_dsc=0, field="files", hashname="md5sum"): ################################################################################ # see http://bugs.debian.org/619131 -def build_package_set(dsc, session = None): - if not dsc.has_key("package-set"): +def build_package_list(dsc, session = None): + if not dsc.has_key("package-list"): return {} packages = {} - for line in dsc["package-set"].split("\n"): + for line in dsc["package-list"].split("\n"): if not line: break - (name, section, priority) = line.split() - (section, component) = extract_component_from_section(section) - - package_type = "deb" - if name.find(":") != -1: - (package_type, name) = name.split(":", 1) - if package_type == "src": - package_type = "dsc" + fields = line.split() + name = fields[0] + package_type = fields[1] + (section, component) = extract_component_from_section(fields[2]) + priority = fields[3] # Validate type if we have a session if session and get_override_type(package_type, session) is None: # Maybe just warn and ignore? exit(1) might be a bit hard... - utils.fubar("invalid type (%s) in Package-Set." % (package_type)) - - if section == "": - section = "-" - if priority == "": - priority = "-" - - if package_type == "dsc": - priority = "source" + utils.fubar("invalid type (%s) in Package-List." % (package_type)) - if not packages.has_key(name) or packages[name]["type"] == "dsc": + if name not in packages or packages[name]["type"] == "dsc": packages[name] = dict(priority=priority, section=section, type=package_type, component=component, files=[]) return packages