treat Pre-Depends like regular Depends
authorHelmut Grohne <helmut@subdivi.de>
Thu, 5 May 2016 19:21:48 +0000 (21:21 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Thu, 5 May 2016 19:21:48 +0000 (21:21 +0200)
The former behaviour was ignoring them. The intended use for dedup is to
know whenever a package unconditionally requires another package.

dedup/debpkg.py

index ba0b7c9..337e385 100644 (file)
@@ -22,9 +22,10 @@ def process_control(control_contents):
     version = control["version"]
     architecture = control["architecture"]
     # deb822 currently returns :any dependencies raw. see #670679
+    deprelations = control.relations.get("depends", []) + \
+                   control.relations.get("pre-depends", [])
     depends = set(dep[0]["name"].split(u':', 1)[0]
-                  for dep in control.relations.get("depends", ())
-                  if len(dep) == 1)
+                  for dep in deprelations if len(dep) == 1)
     return dict(package=package, source=source, version=version,
                 architecture=architecture, depends=depends)