[Blends-commit] r1754 - in blends/trunk/webtools: . templates
Debian Pure Blends Subversion Commit
noreply at alioth.debian.org
Sun Aug 9 07:35:19 UTC 2009
Author: tille
Date: Sun Aug 9 07:35:18 2009
New Revision: 1754
URL: http://svn.debian.org/viewsvn/blends?rev=1754&view=rev
Log:
Checking DEHS for outdated versions
Modified:
blends/trunk/webtools/blendstasktools.py
blends/trunk/webtools/templates/tasks.xhtml
Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=1754&view=diff&r1=1754&r2=1753&p1=blends/trunk/webtools/blendstasktools.py&p2=blends/trunk/webtools/blendstasktools.py
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Sun Aug 9 07:35:18 2009
@@ -271,14 +271,22 @@
# Obtain available versions including the architectures where this version is available
query = """PREPARE pkg_versions_arch (text, text) AS
SELECT release, version, array_to_string(array_accum(architecture),',') AS architectures FROM
- ( SELECT architecture, version, release FROM packages
+ ( SELECT architecture, version,
+ release || CASE WHEN char_length(substring(distribution from '-.*')) > 0 THEN substring(distribution from '-.*') ELSE '' END AS release FROM packages
WHERE package = $1 AND component = $2
- GROUP BY architecture, version, release
+ GROUP BY architecture, version, release, distribution
ORDER BY architecture
) AS av
GROUP BY version, release ORDER BY version DESC;"""
curs.execute(query)
+# Obtain upstream version in case it is newer than Debian version
+query = """PREPARE pkg_dehs (text) AS
+ SELECT DISTINCT d.source, unstable_upstream, unstable_parsed_version, unstable_status FROM dehs d
+ JOIN packages p ON p.source = d.source
+ WHERE p.package = $1 AND unstable_status = 'outdated' ;"""
+curs.execute(query)
+
# Obtain Vcs Information from source table - use only latest version because this is
query = """PREPARE src_vcs (text) AS
SELECT vcs_type AS "vcs-type", vcs_url AS "vcs-url", vcs_browser AS "vcs-browser" FROM sources
@@ -497,6 +505,7 @@
self.properties[field] = HOMEPAGENONE
self.vcs_found = 0 # we need a flag to store the fact whether Vcs information of a package is in UDD
self.version = [] # list of {'release', 'version', 'archs'} dictionary containing version and architecture information
+ self.outdated = {} # If not empty directory then release='upstream' and package is outdated
self.popcon = {} # dictionary containing vote and recnt values of popcon information
self.popconsubmit = None # number of popcon submissions
self.debtags = [] # list of {'tag', 'value'} dictionary containing debtag information
@@ -578,6 +587,14 @@
for row in RowDictionaries(curs):
self.version.append({'release':row['release'], 'version': row['version'], 'archs':row['architectures']})
+ query = "EXECUTE pkg_dehs ('%s')" % (self.pkg)
+ curs.execute(query)
+ if curs.rowcount > 0:
+ row = RowDictionaries(curs)[0]
+ self.outdated['release'] = 'upstream'
+ self.outdated['version'] = row['unstable_upstream']
+ self.outdated['architectures'] = ''
+
query = "EXECUTE popcon ('%s')" % (self.pkg)
curs.execute(query)
if curs.rowcount > 0:
Modified: blends/trunk/webtools/templates/tasks.xhtml
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/templates/tasks.xhtml?rev=1754&view=diff&r1=1754&r2=1753&p1=blends/trunk/webtools/templates/tasks.xhtml&p2=blends/trunk/webtools/templates/tasks.xhtml
==============================================================================
--- blends/trunk/webtools/templates/tasks.xhtml (original)
+++ blends/trunk/webtools/templates/tasks.xhtml Sun Aug 9 07:35:18 2009
@@ -100,6 +100,8 @@
<py:for each="version in project.version">
<tr><td class="release">${version['release']}</td><td class="version">${version['version']}</td><td class="archs">${version['archs']}</td></tr>
</py:for>
+ <tr py:if="project.outdated != {}"><td class="outdated">${project.outdated['release']}</td><td class="outdated">${project.outdated['version']}</td>
+ </tr>
</table>
</span>
<span py:if="project.debtags != []" class="tooltip" id="${project.pkg}-debtags">
More information about the Blends-commit
mailing list