[Blends-commit] [SCM] website branch, master, updated. 4c016db575165db9a75e26761169140835f9dff7

Ole Streicher ole at aip.de
Fri Mar 18 15:59:33 UTC 2016


The following commit has been merged in the master branch:
commit de8c8b56d378a73d9c52ed524a5960d03ac875ef
Author: Ole Streicher <ole at aip.de>
Date:   Fri Mar 18 14:14:07 2016 +0100

    Replace maintainer/uploader_email/_name with dicts

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index ed44c16..9f35a1f 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -991,10 +991,8 @@ class Tasks:
                             'name': tdep.pkg,
                             'debian_version': tdep.version[-1]['version'],
                             'upstream_version': tdep.outdated['version'],
-                            'maintainer_name': tdep.properties.get('maintainer_name'),
-                            'maintainer_email': tdep.properties.get('maintainer_email'),
-                            'uploader_name': tdep.properties.get('uploader_name'),
-                            'uploader_email': tdep.properties.get('uploader_email'),
+                            'maintainer': tdep.properties.get('maintainer'),
+                            'uploader': tdep.properties.get('uploader'),
                         })
             if pkgList:
                 ret[task] = pkgList
@@ -1194,7 +1192,7 @@ class TaskDependencies:
                         # Make sure there is really enough information to deal with provided by the package
                         logger.error("Missing package information for field %s = %s in task file %s" % (key, responsible, self.task))
                         continue
-                    if 'maintainer_email' in dep.properties:
+                    if 'maintainer' in dep.properties:
                         # we are dealing with an official package that has a real maintainer who
                         # is finally responsible
                         # ... but do not issue a hint about this in the logs. Sometimes a responsible
@@ -1203,8 +1201,7 @@ class TaskDependencies:
                         continue
                     if responsible:
                         (_name, _url) = email.utils.parseaddr(responsible)
-                        dep.properties['maintainer_name'] = _name
-                        dep.properties['maintainer_email'] = _url
+                        dep.properties['maintainer'] = {'name':_name, 'email': _url}
                     continue
 
                 if key in dep_strength_keys:
@@ -1237,8 +1234,7 @@ class TaskDependencies:
                         dep.why            = why
                         if responsible:
                             (_name, _url) = email.utils.parseaddr(responsible)
-                            dep.properties['maintainer_name'] = _name
-                            dep.properties['maintainer_email'] = _url
+                            dep.properties['maintainer'] = {'name':_name, 'email': _url}
 
                         dep.dep_strength   = key
                         if dep_in_line.islower():
@@ -1587,8 +1583,7 @@ class TaskDependencies:
                     changed = row['changed_by']
                     if changed:
                         (_name, _url) = email.utils.parseaddr(changed)
-                        dep.properties['uploader_name'] = _name
-                        dep.properties['uploader_email'] = _url
+                        dep.properties['uploader'] = {'name': _name, 'email': _url}
 
                 # link to packages.debian.org search page to see overview about all
                 # package versions in all releases
@@ -1596,8 +1591,7 @@ class TaskDependencies:
 
                 for l in languages:
                     if row.get('description_' + l):
-                        dep.desc[l] = {}
-                        dep.desc[l]['short'] = row['description_' + l]
+                        dep.desc[l] = {'short': row['description_' + l]}
                         if row['long_description_' + l]:
                             dep.desc[l]['long']  = PrepareMarkdownInput(row['long_description_' + l])
                 if 'short' not in dep.desc['en']:
@@ -1606,8 +1600,7 @@ class TaskDependencies:
 
                 if row['maintainer']:
                     (_name, _url) = email.utils.parseaddr(row['maintainer'])
-                    dep.properties['maintainer_name'] = _name
-                    dep.properties['maintainer_email'] = _url
+                    dep.properties['maintainer'] = {'name': _name, 'email': _url}
 
                 if row.get('edam_topics'):
                     logger.info("Edam topics found for package %s: %s" % (dep.pkg, str(row['edam_topics'])))
@@ -1662,8 +1655,7 @@ class TaskDependencies:
                 dep.desc['en']['long']  = PrepareMarkdownInput(row['long_description_en'])
                 if row['maintainer']:
                     (_name, _url) = email.utils.parseaddr(row['maintainer'])
-                    dep.properties['maintainer_name'] = _name
-                    dep.properties['maintainer_email'] = _url
+                    dep.properties['maintainer'] = {'name': _name, 'email': _url}
 
                 dep.SetPublications(row)
                 if row['changed_by']:
@@ -1674,8 +1666,7 @@ class TaskDependencies:
                         logger.warning("Encoding problem for uploader to ftpnew of package '%s' in task %s (%s)" % (dep.pkg, dep.taskname, err))
                     if changed:
                         (_name, _url) = email.utils.parseaddr(changed)
-                        dep.properties['uploader_name'] = _name
-                        dep.properties['uploader_email'] = _url
+                        dep.properties['uploader'] = {'name': _name, 'email': _url}
 
         # Verify whether there are virtual packages which are provided by some other packages in the list of dependencies
         query = "EXECUTE query_provides('%s')" % List2PgArray(pkgs_in_pool)
@@ -1747,8 +1738,7 @@ class TaskDependencies:
                 dep.desc['en']['long'] = PrepareMarkdownInput(row['long_description_en'])
                 if row['maintainer']:
                     (_name, _url) = email.utils.parseaddr(row['maintainer'])
-                    dep.properties['maintainer_name'] = _name
-                    dep.properties['maintainer_email'] = _url
+                    dep.properties['maintainer'] = {'name': _name, 'email': _url}
 
                 if row['changed_by']:
                     try:
@@ -1758,8 +1748,7 @@ class TaskDependencies:
                         logger.warning("Encoding problem for changelog author in Vcs of package '%s' in task %s (%s)" % (dep.pkg, dep.taskname, err))
                     if changed:
                         (_name, _url) = email.utils.parseaddr(changed)
-                        dep.properties['uploader_name'] = _name
-                        dep.properties['uploader_email'] = _url
+                        dep.properties['uploader'] = {'name': _name, 'email': _url}
 
         # Verify whether packages which are neither in pool, new, vcs nor virtual have sufficient information in task file
         for status in self.dependencies.keys():
@@ -1888,8 +1877,7 @@ class TaskDependencies:
                             dep.why            = why
                             if responsible:
                                 (_name, _url) = email.utils.parseaddr(responsible)
-                                dep.properties['maintainer_name'] = _name
-                                dep.properties['maintainer_email'] = _url
+                                dep.properties['maintainer'] = {'name':_name, 'email': _url}
                             dep.dep_strength   = key
                             dep.pkg            = virt_provides
                             dep._QueryUDD4Package(source)
diff --git a/webtools/blendstasktools_udd.py b/webtools/blendstasktools_udd.py
index ddedbf1..9075b23 100644
--- a/webtools/blendstasktools_udd.py
+++ b/webtools/blendstasktools_udd.py
@@ -1187,8 +1187,7 @@ class TaskDependencies:
                 changed = row['changed_by']
                 if changed:
                     (_name, _url) = email.utils.parseaddr(changed)
-                    dep.properties['uploader_name'] = _name
-                    dep.properties['uploader_email'] = _url
+                    dep.properties['uploader'] = {'name': _name, 'email': _url}
 
             # link to packages.debian.org search page to see overview about all
             # package versions in all releases
@@ -1205,8 +1204,7 @@ class TaskDependencies:
                 dep.desc['en']['short'] = "??? missing short description for package %s :-(" % dep.pkg
                     
             (_name, _url) = email.utils.parseaddr(row['maintainer'])
-            dep.properties['maintainer_name'] = _name
-            dep.properties['maintainer_email'] = _url
+            dep.properties['maintainer'] = {'name': _name, 'email': _url}
 
             if row.get('edam_topics'):
                 logger.info("Edam topics found for package %s: %s" % (dep.pkg, str(row['edam_topics'])))
diff --git a/webtools/bugs.py b/webtools/bugs.py
index b3b8e81..4f885c2 100755
--- a/webtools/bugs.py
+++ b/webtools/bugs.py
@@ -234,8 +234,7 @@ def main():
             sources['homepage']    = pkg['homepage']
             sources['vcs_browser'] = pkg['vcs_browser']
             (_name, _url) = email.utils.parseaddr(pkg['maintainer'])
-            sources['maintainer_email'] = _url
-            sources['maintainer_name']  = _name
+            sources['maintainer'] = {'name': _name, 'email': _url}
             if pkg['status'] == 'depends':
                 sources['bugs'] = bugs[pkg['source']]['open']
                 bugs_data[task][pkg['status'] + '_l'].append(pkg['source'])
@@ -261,8 +260,7 @@ def main():
                 sources['homepage']    = pkg['homepage']
                 sources['vcs_browser'] = pkg['vcs_browser']
                 (_name, _url) = email.utils.parseaddr(pkg['maintainer'])
-                sources['maintainer_email'] = _url
-                sources['maintainer_name']  = _name
+                sources['maintainer'] = {'name': _name, 'email': _url}
                 sources['bugs']        = bugs[pkg['source']]['done']
                 bugs_data[task]['done_l'].append(pkg['source'])
                 bugs_data[task]['done']['sources'].append(sources)
diff --git a/webtools/new_upstream.py b/webtools/new_upstream.py
index d52ca7d..a0aa65f 100755
--- a/webtools/new_upstream.py
+++ b/webtools/new_upstream.py
@@ -25,9 +25,9 @@ for task in packages.keys():
         printstring = '\t{name}:\n'
         printstring += '\t\tHighest version in Debian is {debian_version}\n'
         printstring += '\t\tUpstream has {upstream_version}\n'
-        printstring += '\t\tMaintainer is {maintainer_name} <{maintainer_email}>'
-        if 'uloader_name' in pkg_v_o:
-            printstring += '\n\t\tLast uploader was {uploader_name} <{uploader_email}>'
+        printstring += '\t\tMaintainer is {maintainer[name]} <{maintainer[email]}>'
+        if 'uloader' in pkg_v_o:
+            printstring += '\n\t\tLast uploader was {uploader[name]} <{uploader[email]}>'
         print(printstring.format(**pkg_v_o))
 
 # Perhaps we should also send a mail to pts at qa.debian.org
diff --git a/webtools/templates/bugs.xhtml b/webtools/templates/bugs.xhtml
index 6caa604..8df4efc 100644
--- a/webtools/templates/bugs.xhtml
+++ b/webtools/templates/bugs.xhtml
@@ -108,7 +108,7 @@
                           <span py:otherwise=""><a href="${pkgbug['vcs_browser']}">${vcslocation}</a></span>
 			</span>
                         <span class="bugsmaintainer" id="bugsmaintainer" py:choose="">
-                          <span py:when="'maintainer_email' in pkgbug"><a href="mailto:${pkgbug['maintainer_email']}">${pkgbug['maintainer_name']}</a></span>
+                          <span py:when="'maintainer' in pkgbug"><a href="mailto:${pkgbug['maintainer']['email']}">${pkgbug['maintainer']['name']}</a></span>
                           <span py:otherwise="">unknown maintainer</span>
 			</span>
 		      </div>
diff --git a/webtools/templates/packagelist.xhtml b/webtools/templates/packagelist.xhtml
index cc69ea1..55b054f 100644
--- a/webtools/templates/packagelist.xhtml
+++ b/webtools/templates/packagelist.xhtml
@@ -49,8 +49,8 @@
 	<span py:otherwise="">${tasks[task].metapkg.desc['en']['short']}</span>
 	</span></a></h2>
 	<p py:choose="">
-	  <span py:when="lang in tasks[task].metapkg.desc">${render_longdesc(tasks[task].metapkg.desc[lang]['long'])}</span>
-	  <span py:otherwise="">${render_longdesc(tasks[task].metapkg.desc['en']['long'])}</span>
+	  <span py:when="lang in tasks[task].metapkg.desc">${render_longdesc(tasks[task].metapkg.desc[lang].get('long', ''))}</span>
+	  <span py:otherwise="">${render_longdesc(tasks[task].metapkg.desc['en'].get('long', ''))}</span>
 	</p>
 	<py:for each="pstatus in dependencies[task]">
 	  <h3>${headline[pstatus]}</h3>
diff --git a/webtools/templates/packages.xhtml b/webtools/templates/packages.xhtml
index e4a9571..d402886 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -424,13 +424,13 @@ function show_fulldesc(hash) {
 			</ul>
 		      </dd>
 		    </py:if>
-		    <py:if test="'maintainer_email' in project.properties">
+		    <py:if test="'maintainer' in project.properties">
 		      <dt>${maintainer[pstatus]}</dt>
 		      <dd>
 			<ul class="desc-inline">
-			  <li><a href="mailto:${project.properties['maintainer_email']}">${project.properties['maintainer_name']}</a></li>
-			  <py:if test="'uploader_email' in project.properties">
-			    <li><a href="mailto:${project.properties['uploader_email']}">${project.properties['uploader_name']}</a></li>
+			  <li><a href="mailto:${project.properties['maintainer']['email']}">${project.properties['maintainer']['name']}</a></li>
+			  <py:if test="'uploader' in project.properties">
+			    <li><a href="mailto:${project.properties['uploader']['email']}">${project.properties['uploader']['name']}</a></li>
 			  </py:if>
 			</ul>
 		      </dd>
diff --git a/webtools/templates/tasks.xhtml b/webtools/templates/tasks.xhtml
index 72fd862..b0f7be1 100644
--- a/webtools/templates/tasks.xhtml
+++ b/webtools/templates/tasks.xhtml
@@ -92,8 +92,8 @@
                 <span py:when="'#'">${nohomepage}</span>
                 <span py:otherwise=""><a href="${project.properties['homepage']}">${project.properties['homepage']}</a></span>
              </div>
-	     <div py:if="'maintainer_email' in project.properties">${maintainer[pstatus]}:
-               <a href="mailto:${project.properties['maintainer_email']}">${project.properties['maintainer_name']}</a> <span py:if="'uploader_email' in project.properties">(<a href="mailto:${project.properties['uploader_email']}">${project.properties['uploader_name']}</a>)</span>
+	     <div py:if="'maintainer' in project.properties">${maintainer[pstatus]}:
+               <a href="mailto:${project.properties['maintainer']['email']}">${project.properties['maintainer']['name']}</a> <span py:if="'uploader' in project.properties">(<a href="mailto:${project.properties['uploader']['email']}">${project.properties['uploader']['name']}</a>)</span>
              </div>
 	   </td>
 	   <td py:if="project.component and project.pkgstatus != 'new' and project.pkgstatus != 'pkgvcs'" class="project-info">

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list