From: Luca Falavigna Date: Sun, 7 Apr 2013 22:05:35 +0000 (+0000) Subject: Colorize Pre-Depends packages too X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12d561ac9f920dd7648e76ed928af4efd82e4e15;p=dak Colorize Pre-Depends packages too --- diff --git a/dak/examine_package.py b/dak/examine_package.py index 7c005783..56bb477e 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -232,6 +232,7 @@ def split_depends (d_str) : def read_control (filename): recommends = [] + predepends = [] depends = [] section = '' maintainer = '' @@ -250,6 +251,10 @@ def read_control (filename): control_keys = control.keys() + if "Pre-Depends" in control: + predepends_str = control["Pre-Depends"] + predepends = split_depends(predepends_str) + if "Depends" in control: depends_str = control["Depends"] # create list of dependancy lists @@ -286,7 +291,7 @@ def read_control (filename): else: maintainer = escape_if_needed(maintainer) - return (control, control_keys, section, depends, recommends, arch, maintainer) + return (control, control_keys, section, predepends, depends, recommends, arch, maintainer) def read_changes_or_dsc (suite, filename, session = None): dsc = {} @@ -415,7 +420,7 @@ def output_package_relations (): return foldable_output("Package relations", "relations", to_print) def output_deb_info(suite, filename, packagename, session = None): - (control, control_keys, section, depends, recommends, arch, maintainer) = read_control(filename) + (control, control_keys, section, predepends, depends, recommends, arch, maintainer) = read_control(filename) if control == '': return formatted_text("no control info") @@ -423,7 +428,10 @@ def output_deb_info(suite, filename, packagename, session = None): if not package_relations.has_key(packagename): package_relations[packagename] = {} for key in control_keys : - if key == 'Depends': + if key == 'Pre-Depends': + field_value = create_depends_string(suite, predepends, session) + package_relations[packagename][key] = field_value + elif key == 'Depends': field_value = create_depends_string(suite, depends, session) package_relations[packagename][key] = field_value elif key == 'Recommends':