[Blends-commit] r2294 - blends/trunk/webtools

Debian Pure Blends Subversion Commit noreply at alioth.debian.org
Thu Jul 29 14:42:45 UTC 2010


Author: tille
Date: Thu Jul 29 14:42:43 2010
New Revision: 2294
URL: http://svn.debian.org/viewsvn/blends?rev=2294&view=rev

Log:
More info about outdated packages


Modified:
   blends/trunk/webtools/blendstasktools.py
   blends/trunk/webtools/new_upstream.py

Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=2294&view=diff&r1=2294&r2=2293&p1=blends/trunk/webtools/blendstasktools.py&p2=blends/trunk/webtools/blendstasktools.py
==============================================================================
--- blends/trunk/webtools/blendstasktools.py	(original)
+++ blends/trunk/webtools/blendstasktools.py	Thu Jul 29 14:42:43 2010
@@ -721,6 +721,20 @@
             print >>stderr, "Failed to obtain source for package", self.pkg
             return
 
+        query = "EXECUTE query_get_latest_uploader ('%s')" % (self.src)
+        curs.execute(query)
+        try:
+            changed = to_unicode(curs.fetchone()[0])
+	except TypeError, err:
+            changed = None
+            print "Query '%s' does not result in a valid changed entry (%s)" % (query, err)
+        if changed:
+            if not changed.startswith(self.properties['maintainer']):
+                (_name, _url) = email.Utils.parseaddr(changed)
+                changed = '<a href="mailto:%s">%s</a>' % (_url, _name)
+                self.properties['changed_by']    = MarkupString(changed, self.pkg, 'changed_by')
+                self.properties['last_uploader'] = to_unicode(_name) + ' <' + _url + '>'
+
         if source == 0: # If we are querying for source packages to render BTS pages
                 # tranlations are irrelevant - so only obtain ddtp translations
                 # otherwise
@@ -733,19 +747,6 @@
                 self.desc[lang]['short'] = MarkupString(to_unicode(row['description']), self.pkg, 'ShortDesc - ' + lang)
                 self.desc[lang]['long']  = Markup(render_longdesc(to_unicode(row['long_description']).splitlines()))
 
-            query = "EXECUTE query_get_latest_uploader ('%s')" % (self.src)
-            curs.execute(query)
-            try:
-                changed = to_unicode(curs.fetchone()[0])
-	    except TypeError, err:
-                changed = None
-                print "Query '%s' does not result in a valid changed entry (%s)" % (query, err)
-            if changed:
-                if not changed.startswith(self.properties['maintainer']):
-                    (_name, _url) = email.Utils.parseaddr(changed)
-                    changed = '<a href="mailto:%s">%s</a>' % (_url, _name)
-                    self.properties['changed_by'] = MarkupString(changed, self.pkg, 'changed_by')
-
         query = "EXECUTE query_check_enhances ('%"+self.pkg+"%')"
         curs.execute(query)
 
@@ -888,8 +889,12 @@
             for dep in use_dependencystatus:
                 for tdep in tdeps.dependencies[dep]:
             	    if tdep.outdated != {}:
-            		# versionen sind geordnete Liste ---v--- letztes wird gebraucht
-                	list.append((tdep.pkg, tdep.version[-1]['version'], tdep.outdated['version']))
+                        if tdep.properties.has_key('last_uploader'):
+                            last_uploader = tdep.properties['last_uploader']
+                        else:
+                            last_uploader = None
+            		# versions are ordered lists      ---v--- last one is needed
+                	list.append(((tdep.pkg, tdep.version[-1]['version'], tdep.outdated['version'], tdep.properties['maintainer']), last_uploader))
             if list:
         	ret[task] = list
         return ret

Modified: blends/trunk/webtools/new_upstream.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/new_upstream.py?rev=2294&view=diff&r1=2294&r2=2293&p1=blends/trunk/webtools/new_upstream.py&p2=blends/trunk/webtools/new_upstream.py
==============================================================================
--- blends/trunk/webtools/new_upstream.py	(original)
+++ blends/trunk/webtools/new_upstream.py	Thu Jul 29 14:42:43 2010
@@ -21,7 +21,10 @@
 for task in packages.keys():
 	print "Updatable packages in Task", task
 	for pkg_v_o in packages[task]:
-		print "   %s: Highest version in Debian is %s; Upstream has %s" % ( pkg_v_o )
+		printstring = "\t%s:\n\t\tHighest version in Debian is %s\n\t\tUpstream has %s\n\t\tMaintainer is %s" % ( pkg_v_o[0] )
+		if pkg_v_o[1]:
+			printstring = printstring + "\n\t\tLast uploader was " + pkg_v_o[1]
+		print printstring
 
 # Perhaps we should also send a mail to pts at qa.debian.org
 #     keyword %(pkg) %(list) = bts bts-control upload-source katie-other summary default cvs ddtp derivatives contact



More information about the Blends-commit mailing list