]> git.decadent.org.uk Git - dak.git/commitdiff
Colorize Pre-Depends packages too
authorLuca Falavigna <dktrkranz@debian.org>
Sun, 7 Apr 2013 22:05:35 +0000 (22:05 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sun, 7 Apr 2013 22:05:35 +0000 (22:05 +0000)
dak/examine_package.py

index 7c005783f9a46cff048b24e5eb52e1436050930a..56bb477e49a34801f6363a8f691d3c4b24e6f12b 100755 (executable)
@@ -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':