X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=38a987faf701f7e73d0f5a905e915b5f7858c9c8;hb=0873d6309f8352ffd4331ec373b10dc737b4dfb3;hp=c144624a21b13b2872b455badccfd8279bb31efb;hpb=751e8fbc852d3810fc1588cba7677de78ba419db;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index c144624a..38a987fa 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -526,8 +526,7 @@ def parse_checksums(where, files, manifest, hashname): files[checkfile][hash_key(hashname)] = checksum for f in files.keys(): if not files[f].has_key(hash_key(hashname)): - rejmsg.append("%s: no entry in checksums-%s in %s" % (checkfile, - hashname, where)) + rejmsg.append("%s: no entry in checksums-%s in %s" % (f, hashname, where)) return rejmsg ################################################################################ @@ -577,39 +576,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)) + utils.fubar("invalid type (%s) in Package-List." % (package_type)) - if section == "": - section = "-" - if priority == "": - priority = "-" - - if package_type == "dsc": - priority = "source" - - 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 @@ -777,7 +765,7 @@ def which_conf_file (): homedir = os.getenv("HOME") confpath = os.path.join(homedir, "/etc/dak.conf") if os.path.exists(confpath): - apt_pkg.ReadConfigFileISC(Cnf,default_config) + apt_pkg.ReadConfigFileISC(Cnf,confpath) # We are still in here, so there is no local config file or we do # not allow local files. Do the normal stuff.