[Blends-commit] [SCM] website branch, master, updated. 2eb2edab0ccc64a1cbc52d215f82634e0dbdac20
Andreas Tille
tille at debian.org
Wed Sep 11 12:00:19 UTC 2013
The following commit has been merged in the master branch:
commit 2eb2edab0ccc64a1cbc52d215f82634e0dbdac20
Author: Andreas Tille <tille at debian.org>
Date: Wed Sep 11 14:03:38 2013 +0200
Make sure that bugs of source packages with at least one binary package will be ranked higher than only suggested packages
diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index db439b9..a060862 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -69,7 +69,7 @@ def main():
# Metadata of packages that might have bugs
query = """PREPARE query_bug_packages (text) AS
- SELECT distinct sources.source, tasks.tasks, CASE WHEN dependency = 'd' AND component = 'main' THEN 'depends' ELSE 'suggests' END AS status, homepage, vcs_browser, maintainer
+ SELECT distinct sources.source, task, CASE WHEN (tasks.dependency = 'd' OR tasks.dependency = 'r') AND component = 'main' THEN 'depends' ELSE 'suggests' END AS status, homepage, vcs_browser, maintainer
FROM (
SELECT s.source, b.dependency, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version, row_number() OVER (PARTITION BY s.source ORDER BY s.version DESC)
FROM blends_dependencies b
@@ -80,15 +80,17 @@ def main():
GROUP BY s.source, b.dependency, b.component, s.homepage, s.vcs_browser, s.maintainer, s.version
) sources
LEFT OUTER JOIN (
- SELECT source, array_agg(task) AS tasks FROM (
- SELECT DISTINCT p.source, b.task
+ SELECT source, task, dependency FROM (
+ SELECT p.source, b.task, bdp.dependency, row_number() OVER (PARTITION BY p.source, b.task ORDER BY bdp.priority)
FROM packages p
JOIN releases r ON p.release = r.release
JOIN blends_dependencies b ON b.package = p.package
JOIN sources s ON p.source = s.source AND p.release = s.release
+ JOIN blends_dependencies_priorities bdp ON b.dependency = bdp.dependency
WHERE b.blend = $1
+ GROUP BY p.source, b.task, bdp.dependency, bdp.priority
) tmp
- GROUP BY source
+ WHERE row_number = 1
) tasks ON sources.source = tasks.source
WHERE row_number = 1
ORDER BY source;
@@ -210,7 +212,7 @@ def main():
_execute_udd_query( "EXECUTE query_bug_packages('%s')" % blendname)
if curs.rowcount > 0:
for pkg in RowDictionaries(curs):
- for task in pkg['tasks']:
+ task = pkg['task']
sources = {}
sources['source'] = pkg['source']
sources['homepage'] = pkg['homepage']
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list