[med-svn] r1340 - trunk/community/infrastructure/test
tille at alioth.debian.org
tille at alioth.debian.org
Fri Feb 8 22:01:52 UTC 2008
Author: tille
Date: 2008-02-08 22:01:52 +0000 (Fri, 08 Feb 2008)
New Revision: 1340
Modified:
trunk/community/infrastructure/test/cddtasktools.py
trunk/community/infrastructure/test/update-tasks
Log:
More fixes (not working yet)
Modified: trunk/community/infrastructure/test/cddtasktools.py
===================================================================
--- trunk/community/infrastructure/test/cddtasktools.py 2008-02-07 20:13:08 UTC (rev 1339)
+++ trunk/community/infrastructure/test/cddtasktools.py 2008-02-08 22:01:52 UTC (rev 1340)
@@ -155,6 +155,20 @@
ret[task] = list
return ret
+ def GetListOfDepsForTask(self, task, dependencytypes=()):
+ # David Paleino needs for his web tools a dictionary
+ # [list of dependencies]
+ # This will be prepared here from the main
+ # datastructure
+ ret = []
+ if dependencytypes == ():
+ dependencytypes=('official', 'unofficial', 'prospective')
+ tdeps = self.tasks[task]
+ for dep in dependencytypes:
+ for tdep in tdeps.dependencies[dep]:
+ ret.append(tdep.pkg)
+ return ret
+
def GetTaskDescDict(self):
# David Paleino needs for his web tools a dictionary
# { taskname : { 'Task' : task
Modified: trunk/community/infrastructure/test/update-tasks
===================================================================
--- trunk/community/infrastructure/test/update-tasks 2008-02-07 20:13:08 UTC (rev 1339)
+++ trunk/community/infrastructure/test/update-tasks 2008-02-08 22:01:52 UTC (rev 1340)
@@ -51,7 +51,9 @@
<a id="official-debs" name="official-debs"></a>
Official Debian packages
</h2>"""
- node.official.repeat(renderOfficial, deppkg)
+ node.official.repeat(renderOfficial,
+ cdeps.GetListOfDepsForTask(task, dependencytypes=('official',)),
+ deppkg)
if task in todo:
error = True
@@ -81,7 +83,7 @@
# task files. Write it to stdout.
print "Error: problems with %s" % task
-def renderOfficial(node, debpkg):
+def renderOfficial(node, package, deppkg):
# Here we parse just official packages
node.shortdesc.content = deppkg.pkgShortDesc
node.project.raw = "<table class=\"project\" summary=\"%s\">" % package
@@ -103,6 +105,7 @@
#~ node.deburl.content = "X" ### TODO: add a nice icon here to download the .deb package
node.deburl.raw = "<img src=\"/img/deb-icon.png\" />"
+
def renderUnofficial(node, package):
# Here we parse just unofficial packages
node.shortdesc.content = cdeps.tasks[task].dependencies['unofficial'][package].pkgShortDesc
More information about the debian-med-commit
mailing list