[Blends-commit] [SCM] website branch, master, updated. 7f52102eefd4a9f6e7cdbcf994618d4020d9f70c
Andreas Tille
tille at debian.org
Wed Jul 10 09:47:55 UTC 2013
The following commit has been merged in the master branch:
commit 7f52102eefd4a9f6e7cdbcf994618d4020d9f70c
Author: Andreas Tille <tille at debian.org>
Date: Wed Jul 10 11:50:49 2013 +0200
Fix calculation of vcs_browser and add the information to templates
diff --git a/webtools/templates/thermometer.xhtml b/webtools/templates/thermometer.xhtml
index 51b8f38..4aae544 100644
--- a/webtools/templates/thermometer.xhtml
+++ b/webtools/templates/thermometer.xhtml
@@ -81,7 +81,7 @@ table.pkg tr.othered {
</tr>
<py:for each="pkg in blend_data">
<tr class='${pkg.debianstatus}'>
- <td><strong>${pkg.source}</strong> (<span py:choose="pkg.is_in_debian"><span py:when="1"><a href='http://packages.qa.debian.org/${pkg.source}'>PTS</a>, </span><span py:otherwise=""><span py:if="pkg.wnpp != ''"><a href="http://bugs.debian.org/${pkg.wnpp}">WNPP</a>, </span></span></span><a href='${pkg.homepage}'>UP</a>)</td>
+ <td><strong>${pkg.source}</strong> (<span py:choose="pkg.is_in_debian"><span py:when="1"><a href='http://packages.qa.debian.org/${pkg.source}'>PTS</a>, </span><span py:otherwise=""><span py:if="pkg.wnpp != ''"><a href="http://bugs.debian.org/${pkg.wnpp}">WNPP</a>, </span></span></span><span py:if="pkg.vcs_browser != ''"><a href="${pkg.vcs_browser}">VCS</a>, </span><a href='${pkg.homepage}'>UP</a>)</td>
<td>${pkg.stable}</td><td>${pkg.testing}</td><td>${pkg.unstable}</td><td>${pkg.stable_bpo}</td><td>${pkg.experimental}</td><td>${pkg.UNRELEASED}</td>
</tr>
</py:for>
diff --git a/webtools/templates/uthermometer.xhtml b/webtools/templates/uthermometer.xhtml
index 8cbc085..db223b8 100644
--- a/webtools/templates/uthermometer.xhtml
+++ b/webtools/templates/uthermometer.xhtml
@@ -71,7 +71,7 @@ table.pkg tr.othered {
</tr>
<py:for each="pkg in blend_data">
<tr class='${pkg.ubuntustatus}'>
- <td><strong>${pkg.source}</strong> (<span py:choose="pkg.is_in_debian"><span py:when="1"><a href='http://packages.qa.debian.org/${pkg.source}'>PTS</a>, </span><span py:otherwise=""><span py:if="pkg.wnpp != ''"><a href="http://bugs.debian.org/${pkg.wnpp}">WNPP</a>, </span></span></span><a href='${pkg.homepage}'>UP</a>)</td>
+ <td><strong>${pkg.source}</strong> (<span py:choose="pkg.is_in_debian"><span py:when="1"><a href='http://packages.qa.debian.org/${pkg.source}'>PTS</a>, </span><span py:otherwise=""><span py:if="pkg.wnpp != ''"><a href="http://bugs.debian.org/${pkg.wnpp}">WNPP</a>, </span></span></span><span py:if="pkg.vcs_browser != ''"><a href="${pkg.vcs_browser}">VCS</a>, </span><a href='${pkg.homepage}'>UP</a>)</td>
<td>${pkg.stable}</td><td>${pkg.testing}</td><td>${pkg.unstable}</td><td>${pkg.stable_bpo}</td><td>${pkg.precise}</td><td>${pkg.quantal}</td><td>${pkg.raring}</td>
</tr>
</py:for>
diff --git a/webtools/thermometer.py b/webtools/thermometer.py
index 5782897..97a4ea7 100755
--- a/webtools/thermometer.py
+++ b/webtools/thermometer.py
@@ -80,7 +80,7 @@ def main():
homepage,
wnpp,
is_in_debian,
- vcs.vcs_browser,
+ vcs_browser,
CASE WHEN stable.version >= unstable.version THEN 'upToDate'
WHEN stable.version < unstable.version THEN 'debianOutOfDate'
WHEN stable.version IS NOT NULL AND unstable.version IS NULL THEN 'obsolete'
@@ -120,7 +120,7 @@ def main():
JOIN blends_dependencies bd ON bd.package = u.package
WHERE bd.blend = $1 AND bd.distribution = 'ubuntu'
UNION
- SELECT DISTINCT pr.source, pr.homepage, pr.chlog_version as version FROM blends_prospectivepackages pr
+ SELECT DISTINCT pr.source, pr.homepage, pr.chlog_version as version FROM blends_prospectivepackages pr
JOIN blends_dependencies bd ON bd.package = pr.package
WHERE bd.blend = $1 AND bd.distribution = 'prospective'
) hpversion
@@ -128,6 +128,28 @@ def main():
) tmp
WHERE row_number = 1
) homepage ON b.source = homepage.source
+ LEFT OUTER JOIN ( SELECT source, vcs_browser FROM (
+ SELECT source, vcs_browser, row_number() OVER (PARTITION BY source ORDER BY version DESC) FROM (
+ SELECT DISTINCT p.source, s.vcs_browser, p.version FROM packages p
+ JOIN blends_dependencies bd ON bd.package = p.package
+ JOIN sources s ON p.source = s.source AND p.release = s.release
+ JOIN releases r ON p.release = r.release
+ WHERE bd.blend = $1 AND
+ (r.sort >= (SELECT sort FROM releases WHERE role = 'stable') OR r.sort = 0) -- forget older releases than stable but allow experimental
+ UNION
+ SELECT DISTINCT up.source, us.vcs_browser, up.version FROM ubuntu_packages up
+ JOIN blends_dependencies bd ON bd.package = up.package
+ JOIN ubuntu_sources us ON up.source = us.source AND up.release = us.release
+ WHERE bd.blend = $1 AND bd.distribution = 'ubuntu'
+ UNION
+ SELECT DISTINCT pr.source, pr.vcs_browser, pr.chlog_version as version FROM blends_prospectivepackages pr
+ JOIN blends_dependencies bd ON bd.package = pr.package
+ WHERE bd.blend = $1 AND bd.distribution = 'prospective'
+ ) hpversion
+ GROUP BY source, vcs_browser, version
+ ) tmp
+ WHERE row_number = 1
+ ) vcs ON b.source = vcs.source
LEFT OUTER JOIN (
SELECT DISTINCT p.source, strip_binary_upload(MAX(s.version)) AS version
FROM packages p
@@ -204,23 +226,6 @@ def main():
) tmp
) unreleased ON b.source = unreleased.source
LEFT OUTER JOIN (
- SELECT DISTINCT source, vcs_browser FROM (
- SELECT source, vcs_browser FROM (
- SELECT DISTINCT p.source, s.vcs_browser, p.version
- FROM packages p
- JOIN blends_dependencies b ON b.package = p.package
- JOIN sources s ON p.source = s.source
- WHERE b.blend = $1
- ORDER BY p.version
- ) tmp1
- UNION
- SELECT DISTINCT pr.source, vcs_browser
- FROM blends_dependencies b
- JOIN blends_prospectivepackages pr ON b.package = pr.package
- WHERE b.blend = $1
- ) tmp
- ) vcs ON b.source = vcs.source
- LEFT OUTER JOIN (
SELECT DISTINCT u.source, strip_binary_upload(MAX(s.version)) AS version
FROM ubuntu_packages u
JOIN blends_dependencies b ON b.package = u.package
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list