[Cdd-commits] r823 - in cdd/trunk/webtools: . templates

CDD Subversion Commit noreply at alioth.debian.org
Tue Jun 17 11:57:16 UTC 2008


Author: tille
Date: Tue Jun 17 11:57:16 2008
New Revision: 823

Modified:
   cdd/trunk/webtools/cddtasktools.py
   cdd/trunk/webtools/tasks.py
   cdd/trunk/webtools/templates/tasks.xhtml
Log:
Warn about Dependencies with unknown status instead of adding a "white" section.


Modified: cdd/trunk/webtools/cddtasktools.py
==============================================================================
--- cdd/trunk/webtools/cddtasktools.py	(original)
+++ cdd/trunk/webtools/cddtasktools.py	Tue Jun 17 11:57:16 2008
@@ -527,6 +527,8 @@
             return 'unofficial'
         if dep.pkgShortDesc != None and dep.pkgLongDesc != None:
             return 'prospective'
+        print >>stderr, "DEBUG: insufficient information for pkg = %s, component = %s, pkgURL = %s, pkgShortDesc = %s, pkgLongDesc = %s" % \
+    			 (dep.pkg, dep.component, dep.pkgURL, dep.pkgShortDesc, dep.pkgLongDesc)
         return 'unknown'
 
     def MarkupPreformatedStrings(self):

Modified: cdd/trunk/webtools/tasks.py
==============================================================================
--- cdd/trunk/webtools/tasks.py	(original)
+++ cdd/trunk/webtools/tasks.py	Tue Jun 17 11:57:16 2008
@@ -90,7 +90,7 @@
 	COLORCODES = { 'official'      : _('Green: The project is <a href="#official-debs">available as an official Debian package</a>'),
     		       'unofficial'    : _('Yellow: The project is <a href="#unofficial-debs">available as an unofficial Debian package</a>'),
                        'prospective'   : _('Red: The project is <a href="#debs-not-available">not (yet) available as a Debian package</a>'),
-                       'unknown'       : _('White: The project has an unknown status.')
+#                       'unknown'       : _('White: The project has an unknown status.')
             	     }
 
 	typenames = dict (
@@ -112,8 +112,15 @@
 		data['colorcodes']   = []
 		for type in ['official', 'unofficial', 'prospective', 'unknown']:
 		    if len(cdeps.tasks[task].dependencies[type]) > 0:
-			data['dependencies'].append(type)
-			data['colorcodes'].append(Markup(COLORCODES[type]))
+			if type == 'unknown':
+			    # Just print an error message if there are packages with unknown status
+			    if lang == 'en':
+				# ... but only once and not per language
+				for dep in cdeps.tasks[task].dependencies[type]:
+				    print >>stderr, "Warning: Dependency with unknown status:", dep.pkg
+			else:
+			    data['dependencies'].append(type)
+			    data['colorcodes'].append(Markup(COLORCODES[type]))
 		data['projects']     = cdeps.tasks[task].dependencies
 
 		outputfile = OUTPUTDIR[CDD] + '/' + task + '_' + lang + '.html'

Modified: cdd/trunk/webtools/templates/tasks.xhtml
==============================================================================
--- cdd/trunk/webtools/templates/tasks.xhtml	(original)
+++ cdd/trunk/webtools/templates/tasks.xhtml	Tue Jun 17 11:57:16 2008
@@ -55,7 +55,7 @@
 	 <tr class="deb-${type}">
 	   <td class="project-name">
 	     <a name="${project.pkg}" id="${project.pkg}"/>
-	     <strong>${project.pkg}</strong>
+	     <strong>${project.pkg.capitalize()}</strong>
              <span py:if="project.wnpp != None"> &mdash; <a href="http://bugs.debian.org/#${project.wnpp}">wnpp</a></span><br />
 	     <em>${project.pkgShortDesc}</em><br/>
 	     <a href="$project.homepage}">${project.homepage}</a>



More information about the Cdd-commits mailing list