[med-svn] r1523 - trunk/community/infrastructure/scripts

tille at alioth.debian.org tille at alioth.debian.org
Thu Mar 6 09:00:16 UTC 2008


Author: tille
Date: 2008-03-06 09:00:14 +0000 (Thu, 06 Mar 2008)
New Revision: 1523

Modified:
   trunk/community/infrastructure/scripts/cddtasktools.py
Log:
DDTP needs a sorted list of all dependant packages of the CDD


Modified: trunk/community/infrastructure/scripts/cddtasktools.py
===================================================================
--- trunk/community/infrastructure/scripts/cddtasktools.py	2008-03-06 05:35:46 UTC (rev 1522)
+++ trunk/community/infrastructure/scripts/cddtasktools.py	2008-03-06 09:00:14 UTC (rev 1523)
@@ -221,6 +221,30 @@
             ret[task] = tdict
         return ret
 
+    def GetAllDependantPackagesOfCDD(self, dependencytypes=()):
+        # David Paleino needs for his DDTP web tool a list of
+        # all available Dependencies.
+        ret = []
+        if dependencytypes == ():
+            # official:    A package with this name is found in the Debian repository
+            # unofficial:  The tasks file contains a tag Pkg-URL for the package which is not None
+            # prospective: At least a short and long description are attached to a package name which
+            #              is not in the Debian pool and has no Pkg-URL for an unofficial package
+            # unknown:     Any other package names that are listed as Dependencies but have
+            #              incomplete information.  This usually happens when packages are not
+            #              available in Debian any more (for instance this might happen if a
+            #              name has changed)
+            # Default is only official in this case because DDTP handles only
+            # official packages
+            dependencytypes=('official', )
+        for task in self.tasknames:
+            tdeps = self.tasks[task]
+            for dep in dependencytypes:
+                for tdep in tdeps.dependencies[dep]:
+                    ret.append(tdep.pkg)
+        ret.sort()
+        return ret
+
 class TaskDependencies:
     # List of depencencies defined in one Metapackage
     def __init__(self, cddname, task):




More information about the debian-med-commit mailing list