The following commit has been merged in the master branch:
commit 9b807c8c1497b978499fbc1aa3b6f58dc0c76f92
Author: Andreas Tille <[email protected]>
Date: Fri May 31 14:36:26 2013 +0200
Drop distribution from results to enable grouping over source name, make
sure we get the latest *source* version that might be different from binary
package version (see ncbi-tools6 - blast2)
diff --git a/misc/sql/gis-thermometer.sh b/misc/sql/gis-thermometer.sh
index 5783056..6e41d65 100755
--- a/misc/sql/gis-thermometer.sh
+++ b/misc/sql/gis-thermometer.sh
@@ -6,29 +6,38 @@ if [ $# -lt 1 ] ; then
fi
psql udd >$1.stable <<EOT
-SELECT DISTINCT p.source, strip_binary_upload(version) AS stableversion,
p.distribution
+SELECT DISTINCT p.source, strip_binary_upload(MAX(s.version)) AS stableversion
FROM packages p
JOIN releases r ON p.release = r.release
JOIN blends_dependencies b ON b.package = p.package
- WHERE b.blend = '$1' AND r.role = 'stable'
+ -- make sure we get the right source version that does not necessarily match
binary version
+ JOIN sources s ON p.source = s.source AND p.release = s.release
+ WHERE b.blend = '$1' AND r.role = 'stable' AND p.distribution = 'debian'
+ GROUP BY p.source
ORDER BY p.source;
EOT
psql udd >$1.testing <<EOT
-SELECT DISTINCT p.source, strip_binary_upload(version) AS testingversion,
p.distribution
+SELECT DISTINCT p.source, strip_binary_upload(MAX(s.version)) AS testingversion
FROM packages p
JOIN releases r ON p.release = r.release
JOIN blends_dependencies b ON b.package = p.package
- WHERE b.blend = '$1' AND r.role = 'testing'
+ -- make sure we get the right source version that does not necessarily match
binary version
+ JOIN sources s ON p.source = s.source AND p.release = s.release
+ WHERE b.blend = '$1' AND r.role = 'testing' AND p.distribution = 'debian'
+ GROUP BY p.source
ORDER BY p.source;
EOT
psql udd >$1.unstable <<EOT
-SELECT DISTINCT p.source, strip_binary_upload(version) AS unstableversion,
p.distribution
+SELECT DISTINCT p.source, strip_binary_upload(MAX(s.version)) AS
unstableversion
FROM packages p
JOIN releases r ON p.release = r.release
JOIN blends_dependencies b ON b.package = p.package
- WHERE b.blend = '$1' AND r.role = 'unstable'
+ -- make sure we get the right source version that does not necessarily match
binary version
+ JOIN sources s ON p.source = s.source AND p.release = s.release
+ WHERE b.blend = '$1' AND r.role = 'unstable' AND p.distribution = 'debian'
+ GROUP BY p.source
ORDER BY p.source;
EOT
--
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