[med-svn] r1338 - trunk/community/infrastructure/test

tille at alioth.debian.org tille at alioth.debian.org
Thu Feb 7 19:52:39 UTC 2008


Author: tille
Date: 2008-02-07 19:52:39 +0000 (Thu, 07 Feb 2008)
New Revision: 1338

Modified:
   trunk/community/infrastructure/test/update-tasks
Log:
Some fixes, not working yet


Modified: trunk/community/infrastructure/test/update-tasks
===================================================================
--- trunk/community/infrastructure/test/update-tasks	2008-02-06 23:03:15 UTC (rev 1337)
+++ trunk/community/infrastructure/test/update-tasks	2008-02-07 19:52:39 UTC (rev 1338)
@@ -46,12 +46,12 @@
 	node.date.content = formatdate(time.mktime(t.timetuple()))
 
 	official = cdeps.GetNamesOnlyDict(('official',))
-	if task in official:
+	for deppkg in cdeps.tasks[task].dependencies['official']:
 		node.official_head.raw = """<h2>
 <a id="official-debs" name="official-debs"></a>
 	Official Debian packages
 </h2>"""
-		node.official.repeat(renderOfficial, official[task], task)
+		node.official.repeat(renderOfficial, deppkg)
 
 	if task in todo:
 		error = True
@@ -81,32 +81,32 @@
 		# task files. Write it to stdout.
 		print "Error: problems with %s" % task
 
-def renderOfficial(node, package, task):
+def renderOfficial(node, debpkg):
 	# Here we parse just official packages
-	node.shortdesc.content = det[package]['ShortDesc']
+	node.shortdesc.content = deppkg.pkgShortDesc
 	node.project.raw = "<table class=\"project\" summary=\"%s\">" % package
 	node.anchor.atts['name'] = package
 	node.anchor.atts['id'] = package
 	node.name.content = package.capitalize()
-	node.url.atts['href'] = det[package]['Homepage']
-	if det[package]['Homepage'] == "#":
+	node.url.atts['href'] = deppkg.homepage
+	if deppkg.homepage == "#":
 		node.url.content = "Homepage not available"
 	else:
-		node.url.content = det[package]['Homepage']
+		node.url.content = deppkg.homepage
 
-	node.longdesc.raw = det[package]['LongDesc']
-	node.version.content = "Version: %s" % det[package]['Version']
-	node.license.content = "License: %s" % det[package]['License']
-	node.pkgurl.atts['href'] = det[package]['Pkg-URL']
+	node.longdesc.raw = deppkg.pkgLongDesc
+	node.version.content = "Version: %s" % 'to be determined' # det[package]['Version']
+	node.license.content = "License: %s" % 'to be determined' # det[package]['License']
+	node.pkgurl.atts['href'] =  'to be determined' # det[package]['Pkg-URL']
 	node.pkgurl.content = "Official Debian package"
-	node.deburl.atts['href'] = det[package]['Deb-URL']
+	node.deburl.atts['href'] =  'to be determined' # det[package]['Deb-URL']
 	#~ 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 = package['ShortDesc']
-	node.longdesc.raw = package['LongDesc']
+	node.shortdesc.content = cdeps.tasks[task].dependencies['unofficial'][package].pkgShortDesc
+	node.longdesc.raw = cdeps.tasks[task].dependencies['unofficial'][package].pkgLongDesc
 	node.project.raw = "<table class=\"project\" summary=\"%s\">" % package['Package']
 	node.anchor.atts['name'] = package['Package']
 	node.anchor.atts['id'] = package['Package']




More information about the debian-med-commit mailing list