The following commit has been merged in the master branch:
commit 5b8a2e01df7000f00324f8603721e4cfa8e41c52
Author: Ole Streicher <[email protected]>
Date:   Sat Mar 19 21:50:04 2016 +0100

    Move PrintedName to properties

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 8e1f233..50f3c50 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -722,8 +722,6 @@ class DependantPackage:
         self.taskname       = taskname   # Task which includes the Dependency
         self.pkg            = None  # Name of dependant package
         self.source         = None  # Name of source package of the dependency
-        self.PrintedName    = None  # Only for Meta package names - no use for 
a real dependant package
-                                    # FIXME -> object model
         self.pkgstatus      = 'unknown'  # global pkgstatus: characterizes 
status of dependency, release, packaging status
         self.releases       = []    # List of releases a package might be in
         self.component      = None  # One of: 'main', 'contrib', 'non-free', 
if a package shows up in several components which
@@ -1147,7 +1145,7 @@ class TaskDependencies:
             for key in stanza:
                 if key == 'Task':
                     # also the task name might be utf-8 encoded
-                    self.metapkg.PrintedName = stanza['task']
+                    self.metapkg.properties['PrintedName'] = stanza['task']
                     continue
                 if key == 'Description':
                     if found_description:
@@ -1384,9 +1382,9 @@ class TaskDependencies:
                         # Also ignore keys starting with X[A-Z]-
                         if not re.compile("^X[A-Z]*-").search(key):
                             try:
-                                logger.warning("Unknown key '%s': %s in file 
%s" % (key, stanza[key], self.metapkg.PrintedName))
+                                logger.warning("Unknown key '%s': %s in file 
%s" % (key, stanza[key], self.metapkg.properties['PrintedName']))
                             except:
-                                logger.error("Unknown key '%s' with 
problematic value in file %s." % (key, self.metapkg.PrintedName))
+                                logger.error("Unknown key '%s' with 
problematic value in file %s." % (key, self.metapkg.properties['PrintedName']))
 
             if dep is None:
                 continue  # ... with next stanza
@@ -1425,7 +1423,7 @@ class TaskDependencies:
             for dep in self.dependencies[status]:
                 alldepends.append(dep.pkg)
 
-        if not self.metapkg.PrintedName:
+        if 'PrintedName' not in self.metapkg.properties:
             logger.error("Task file %s is lacking field 'Task' - and thus will 
be ignored" % self.taskfile)
             return 0  # Failure
         if not alldepends:
diff --git a/webtools/blendstasktools_udd.py b/webtools/blendstasktools_udd.py
index 265cfa7..425401e 100644
--- a/webtools/blendstasktools_udd.py
+++ b/webtools/blendstasktools_udd.py
@@ -678,8 +678,6 @@ class DependantPackage:
         self.taskname       = taskname   # Task which includes the Dependency
         self.pkg            = None  # Name of dependant package
         self.source         = None  # Name of source package of the dependency
-        self.PrintedName    = None  # Only for Meta package names - no use for 
a real dependant package
-                                    # FIXME -> object model
         self.pkgstatus      = 'unknown'  # global pkgstatus: characterizes 
status of dependency, release, packaging status
         self.releases       = []    # List of releases a package might be in
         self.component      = None  # One of: 'main', 'contrib', 'non-free', 
if a package shows up in several components which
@@ -1220,7 +1218,8 @@ class TaskDependencies:
         query = "SELECT DISTINCT title, description, long_description FROM 
blends_tasks WHERE task='%s' AND blend='%s'" % (self.task, self.blendname)
         _execute_udd_query(query)
         if curs.rowcount > 0:
-            self.metapkg.PrintedName, shortDesc, longDesc = curs.fetchone()
+            printedName, shortDesc, longDesc = curs.fetchone()
+            self.metapkg.properties['PrintedName'] = printedName
             self.metapkg.desc['en']['short'] = shortDesc
             self.metapkg.desc['en']['long']  = PrepareMarkdownInput(longDesc)
 
diff --git a/webtools/templates/packagelist.xhtml 
b/webtools/templates/packagelist.xhtml
index ab0d37f..4acbb9f 100644
--- a/webtools/templates/packagelist.xhtml
+++ b/webtools/templates/packagelist.xhtml
@@ -38,13 +38,13 @@
       <h2>$tableofcontents</h2>
       <ul>
        <py:for each="task in taskskeys">
-         <li><a 
href="#${task}">${tasks[task].metapkg.PrintedName.capitalize()}</a></li>
+         <li><a 
href="#${task}">${tasks[task].metapkg.properties['PrintedName'].capitalize()}</a></li>
        </py:for>
       </ul>
 
       <py:for each="task in taskskeys">
        <a name="${task}" id="${task}"/>
-       <h2><a href="${task}" name="${task}" 
id="${task}">${tasks[task].metapkg.PrintedName.capitalize()} - <span 
py:choose="">
+       <h2><a href="${task}" name="${task}" 
id="${task}">${tasks[task].metapkg.properties['PrintedName'].capitalize()} - 
<span py:choose="">
        <span py:when="lang in 
tasks[task].metapkg.desc">${tasks[task].metapkg.desc[lang]['short']}</span>
        <span py:otherwise="">${tasks[task].metapkg.desc['en']['short']}</span>
        </span></a></h2>
diff --git a/webtools/templates/packages.xhtml 
b/webtools/templates/packages.xhtml
index 855f75b..32de69f 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -4,7 +4,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="${lang}" lang="${lang}"
       xmlns:py="http://genshi.edgewall.org/";>
   <head>
-      <title>$projectname ${tasks[task].metapkg.PrintedName.capitalize()} 
packages</title>
+      <title>$projectname 
${tasks[task].metapkg.properties['PrintedName'].capitalize()} packages</title>
     <meta http-equiv="Content-Type" content="application/xhtml+xml; 
charset=UTF-8" />
     <link href="http://www.debian.org/debhandheld.css"; media="screen"
          rel="stylesheet" type="text/css" />
@@ -198,7 +198,7 @@ function show_fulldesc(hash) {
          <a href="http://blends.debian.org";>Debian Pure Blends</a>
          / <a href="$projecturl">$projectname</a>
          / <a href="../tasks">$packages</a>
-         / ${tasks[task].metapkg.PrintedName.capitalize()}
+         / ${tasks[task].metapkg.properties['PrintedName'].capitalize()}
        </p>
       </div><!-- end header -->
       <div id="content">
@@ -209,7 +209,7 @@ function show_fulldesc(hash) {
          </ul>
        </p></small>
        <h1>
-         $projectname ${tasks[task].metapkg.PrintedName.capitalize()} packages
+         $projectname 
${tasks[task].metapkg.properties['PrintedName'].capitalize()} packages
        </h1>
        <em>
          <py:choose>
diff --git a/webtools/templates/tasks.xhtml b/webtools/templates/tasks.xhtml
index 5725da3..79178de 100644
--- a/webtools/templates/tasks.xhtml
+++ b/webtools/templates/tasks.xhtml
@@ -4,7 +4,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="${lang}" lang="${lang}"
       xmlns:py="http://genshi.edgewall.org/";>
 <head>
-<title>$projectname ${tasks[task].metapkg.PrintedName.capitalize()} 
packages</title>
+<title>$projectname 
${tasks[task].metapkg.properties['PrintedName'].capitalize()} packages</title>
 <meta http-equiv="Content-Type" content="application/xhtml+xml; 
charset=UTF-8"/>
 <link href="/css/sentinel.css" type="text/css" rel="stylesheet"/>
 </head>
@@ -29,7 +29,7 @@
                <div class="section">
                        <div class="sectionTop"/>
                        <div class="row">
-                               <div 
class="pkgname">${tasks[task].metapkg.PrintedName.capitalize()}</div>
+                               <div 
class="pkgname">${tasks[task].metapkg.properties['PrintedName'].capitalize()}</div>
                                <div class="pkgdesc" py:choose="">
                                  <div py:when="lang in 
tasks[task].metapkg.desc">${tasks[task].metapkg.desc[lang]['short']}</div>
                                  <div 
py:otherwise="">${tasks[task].metapkg.desc['en']['short']}</div>
@@ -63,8 +63,8 @@
                             <div class="link"><a 
href="index">${indexlink}</a></div>
                           <py:for each="t in taskskeys">
                             <div py:choose="t">
-                              <span py:when="task" class="curlink"><a 
href="${t}">${tasks[t].metapkg.PrintedName.capitalize()}</a></span>
-                              <span py:otherwise="" class="link"><a 
href="${t}">${tasks[t].metapkg.PrintedName.capitalize()}</a></span>
+                              <span py:when="task" class="curlink"><a 
href="${t}">${tasks[t].metapkg.properties['PrintedName'].capitalize()}</a></span>
+                              <span py:otherwise="" class="link"><a 
href="${t}">${tasks[t].metapkg.properties['PrintedName'].capitalize()}</a></span>
                             </div>
                           </py:for>
                         </div>
@@ -72,7 +72,7 @@
        </td>
        <td class="main">
                <div class="pageBody">
-                       <h1>$projectname 
${tasks[task].metapkg.PrintedName.capitalize()} packages</h1>
+                       <h1>$projectname 
${tasks[task].metapkg.properties['PrintedName'].capitalize()} packages</h1>
 <py:for each="pstatus in dependencies[task]">
                        <h2><a id="${pstatus}-debs" 
name="${pstatus}-debs"/>${headline[pstatus]}</h2>
    <py:for each="project in projects[task][pstatus]">
diff --git a/webtools/templates/tasks_idx.xhtml 
b/webtools/templates/tasks_idx.xhtml
index 87e25c2..6830119 100644
--- a/webtools/templates/tasks_idx.xhtml
+++ b/webtools/templates/tasks_idx.xhtml
@@ -76,7 +76,7 @@ table {
            <tr>
              <td style="text-transform:capitalize;">
                <a href="${task}" name="${task}" id="${task}">
-                 ${tasks[task].metapkg.PrintedName}
+                 ${tasks[task].metapkg.properties['PrintedName']}
                </a>
              </td>
              <td>

-- 
Static and dynamic websites for Debian Pure Blends

_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to