The following commit has been merged in the master branch:
commit 6325a98b13a1def0c49380ff467ee06a9476ce90
Author: Andreas Tille <[email protected]>
Date: Wed Sep 11 16:18:18 2013 +0200
Packages which are in experimental only have lower relevance for bug
websentinel
diff --git a/misc/sql/bugs.sh b/misc/sql/bugs.sh
index 89571bb..669acee 100755
--- a/misc/sql/bugs.sh
+++ b/misc/sql/bugs.sh
@@ -8,7 +8,7 @@ if [ $# -lt 1 ] ; then
fi
psql udd > $1_buggy_packages.out <<EOT
- SELECT distinct sources.source, task, CASE WHEN (tasks.dependency = 'd'
OR tasks.dependency = 'r') AND component = 'main' THEN 'depends' ELSE
'suggests' END AS status,
+ SELECT distinct sources.source, task, CASE WHEN (tasks.dependency = 'd'
OR tasks.dependency = 'r') AND component = 'main' AND experimental_flag > 0
THEN 'depends' ELSE 'suggests' END AS status,
homepage, CASE WHEN vcs_browser IS NULL THEN '#' ELSE
vcs_browser END AS vcs_browser, maintainer
FROM (
SELECT s.source, b.component, s.homepage, s.vcs_browser,
s.maintainer, s.version, row_number() OVER (PARTITION BY s.source ORDER BY
s.version DESC)
@@ -19,11 +19,11 @@ psql udd > $1_buggy_packages.out <<EOT
WHERE blend = '$1' AND b.distribution = 'debian'
GROUP BY s.source, b.dependency, b.component, s.homepage,
s.vcs_browser, s.maintainer, s.version
) sources
+ -- check status of dependency relation because only suggested packages
are less important for bugs sentinel
LEFT OUTER JOIN (
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
@@ -32,6 +32,12 @@ psql udd > $1_buggy_packages.out <<EOT
) tmp
WHERE row_number = 1
) tasks ON sources.source = tasks.source
+ -- Check, whether a package is in experimental only which makes it
less important for bugs sentinel
+ LEFT OUTER JOIN (
+ SELECT source, MAX(sort) AS experimental_flag FROM sources s
+ JOIN releases r ON s.release = r.release
+ GROUP BY source
+ ) exp ON sources.source = exp.source
WHERE row_number = 1
ORDER BY source;
EOT
diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index 538cf48..5fe3bbd 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -69,10 +69,10 @@ def main():
# Metadata of packages that might have bugs
query = """PREPARE query_bug_packages (text) AS
- SELECT distinct sources.source, task, CASE WHEN (tasks.dependency = 'd'
OR tasks.dependency = 'r') AND component = 'main' THEN 'depends' ELSE
'suggests' END AS status,
+ SELECT distinct sources.source, task, CASE WHEN (tasks.dependency = 'd'
OR tasks.dependency = 'r') AND component = 'main' AND experimental_flag > 0
THEN 'depends' ELSE 'suggests' END AS status,
homepage, CASE WHEN vcs_browser IS NULL THEN '#' ELSE
vcs_browser END AS 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)
+ SELECT s.source, 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
JOIN packages p ON p.package = b.package
JOIN bugs bu ON bu.source = p.source
@@ -80,11 +80,11 @@ def main():
WHERE blend = $1 AND b.distribution = 'debian'
GROUP BY s.source, b.dependency, b.component, s.homepage,
s.vcs_browser, s.maintainer, s.version
) sources
+ -- check status of dependency relation because only suggested packages
are less important for bugs sentinel
LEFT OUTER JOIN (
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
@@ -93,6 +93,12 @@ def main():
) tmp
WHERE row_number = 1
) tasks ON sources.source = tasks.source
+ -- Check, whether a package is in experimental only which makes it
less important for bugs sentinel
+ LEFT OUTER JOIN (
+ SELECT source, MAX(sort) AS experimental_flag FROM sources s
+ JOIN releases r ON s.release = r.release
+ GROUP BY source
+ ) exp ON sources.source = exp.source
WHERE row_number = 1
ORDER BY source;
"""
--
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