[Collab-qa-commits] r1907 - in udd: sql udd web
Lucas Nussbaum
lucas at alioth.debian.org
Tue Feb 8 22:24:59 UTC 2011
Author: lucas
Date: 2011-02-08 22:24:57 +0000 (Tue, 08 Feb 2011)
New Revision: 1907
Modified:
udd/sql/setup.sql
udd/sql/upgrade.sql
udd/udd/bugs_gatherer.pl
udd/web/bugs.cgi
Log:
add affects_oldstable to bugs table
Modified: udd/sql/setup.sql
===================================================================
--- udd/sql/setup.sql 2011-02-07 08:51:56 UTC (rev 1906)
+++ udd/sql/setup.sql 2011-02-08 22:24:57 UTC (rev 1907)
@@ -193,7 +193,8 @@
severity bugs_severity, submitter text, submitter_name text,
submitter_email text, owner text, owner_name text, owner_email text,
done text, done_name text, done_email text, title text,
- last_modified timestamp, forwarded text, affects_stable boolean,
+ last_modified timestamp, forwarded text, affects_oldstable boolean,
+ affects_stable boolean,
affects_testing boolean, affects_unstable boolean,
affects_experimental boolean);
@@ -232,7 +233,8 @@
severity bugs_severity, submitter text, submitter_name text,
submitter_email text, owner text, owner_name text, owner_email text,
done text, done_name text, done_email text, title text,
- last_modified timestamp, forwarded text, affects_stable boolean,
+ last_modified timestamp, forwarded text, affects_oldstable boolean,
+ affects_stable boolean,
affects_testing boolean, affects_unstable boolean,
affects_experimental boolean);
@@ -268,6 +270,14 @@
CREATE TABLE bugs_usertags
(email text, tag text, id int);
+CREATE VIEW bugs_rt_affects_oldstable AS
+SELECT id, package, source FROM bugs
+WHERE affects_oldstable
+AND (id NOT IN (SELECT id FROM bugs_tags WHERE tag IN ('sid', 'sarge', 'etch', 'squeeze', 'wheezy', 'experimental'))
+OR id IN (SELECT id FROM bugs_tags WHERE tag = 'lenny'))
+AND id NOT IN (select id FROM bugs_tags WHERE tag = 'lenny-ignore')
+AND id in (select id from sources, bugs_packages where sources.source = bugs_packages.source and release='lenny');
+
CREATE VIEW bugs_rt_affects_stable AS
SELECT id, package, source FROM bugs
WHERE affects_stable
@@ -315,6 +325,7 @@
GRANT SELECT ON archived_bugs_tags TO PUBLIC;
GRANT SELECT ON archived_bugs_blocks TO PUBLIC;
GRANT SELECT ON archived_bugs_blockedby TO PUBLIC;
+GRANT SELECT ON bugs_rt_affects_oldstable TO PUBLIC;
GRANT SELECT ON bugs_rt_affects_stable TO PUBLIC;
GRANT SELECT ON bugs_rt_affects_testing_and_unstable TO PUBLIC;
GRANT SELECT ON bugs_rt_affects_unstable TO PUBLIC;
Modified: udd/sql/upgrade.sql
===================================================================
--- udd/sql/upgrade.sql 2011-02-07 08:51:56 UTC (rev 1906)
+++ udd/sql/upgrade.sql 2011-02-08 22:24:57 UTC (rev 1907)
@@ -329,3 +329,7 @@
-- 2010-09-25
CREATE INDEX sources_release_idx ON sources(release);
CREATE INDEX bugs_tags_tag_idx ON bugs_tags(tag);
+
+-- 2011-02-08
+ALTER TABLE bugs add affects_oldstable boolean;
+ALTER TABLE archived_bugs add affects_oldstable boolean;
Modified: udd/udd/bugs_gatherer.pl
===================================================================
--- udd/udd/bugs_gatherer.pl 2011-02-07 08:51:56 UTC (rev 1906)
+++ udd/udd/bugs_gatherer.pl 2011-02-08 22:24:57 UTC (rev 1907)
@@ -180,7 +180,7 @@
my $location = $src_config{archived} ? 'archive' : 'db_h';
$table = $src_config{archived} ? $archived_table : $table;
# Read all bugs
- my $insert_bugs_handle = $dbh->prepare("INSERT INTO $table (id, package, source, arrival, status, severity, submitter, submitter_name, submitter_email, owner, owner_name, owner_email, done, done_name, done_email, title, forwarded, last_modified, affects_stable, affects_testing, affects_unstable, affects_experimental) VALUES (\$1, \$2, \$3, \$4::abstime, \$5, \$6, \$7, \$8, \$9, \$10, \$11, \$12, \$13, \$14, \$15, \$16, \$17, \$18::abstime, \$19, \$20, \$21, \$22)");
+ my $insert_bugs_handle = $dbh->prepare("INSERT INTO $table (id, package, source, arrival, status, severity, submitter, submitter_name, submitter_email, owner, owner_name, owner_email, done, done_name, done_email, title, forwarded, last_modified, affects_oldstable, affects_stable, affects_testing, affects_unstable, affects_experimental) VALUES (\$1, \$2, \$3, \$4::abstime, \$5, \$6, \$7, \$8, \$9, \$10, \$11, \$12, \$13, \$14, \$15, \$16, \$17, \$18::abstime, \$19, \$20, \$21, \$22, \$23)");
my $insert_bugs_packages_handle = $dbh->prepare("INSERT INTO ${table}_packages (id, package, source) VALUES (\$1, \$2, \$3)");
my $insert_bugs_found_handle = $dbh->prepare("INSERT INTO ${table}_found_in (id, version) VALUES (\$1, \$2)");
my $insert_bugs_fixed_handle = $dbh->prepare("INSERT INTO ${table}_fixed_in (id, version) VALUES (\$1, \$2)");
@@ -253,10 +253,14 @@
}
#Calculate bug presence in distributions
- my ($present_in_stable, $present_in_testing, $present_in_unstable, $present_in_experimental);
+ my (present_in_oldstable, $present_in_stable, $present_in_testing, $present_in_unstable, $present_in_experimental);
if($src_config{archived}) {
- $present_in_stable = $present_in_testing = $present_in_unstable = $present_in_experimental = 'FALSE';
+ $present_in_oldstable = $present_in_stable = $present_in_testing = $present_in_unstable = $present_in_experimental = 'FALSE';
} else {
+ $present_in_oldstable =
+ bug_presence(bug => $bug_nr, status => \%bug,
+ dist => 'oldstable',
+ arch => \@archs);
$present_in_stable =
bug_presence(bug => $bug_nr, status => \%bug,
dist => 'stable',
@@ -274,10 +278,15 @@
dist => 'experimental',
arch => \@archs);
- if(!defined($present_in_stable) or !defined($present_in_unstable) or !defined($present_in_testing) or !defined($present_in_experimental)) {
+ if(!defined($present_in_oldstable) or !defined($present_in_stable) or !defined($present_in_unstable) or !defined($present_in_testing) or !defined($present_in_experimental)) {
print "NUMBER: $bug_nr\n";
}
+ if(defined($present_in_oldstable) and ($present_in_oldstable eq 'absent' or $present_in_oldstable eq 'fixed')) {
+ $present_in_oldstable = 'FALSE';
+ } else {
+ $present_in_oldstable = 'TRUE';
+ }
if(defined($present_in_stable) and ($present_in_stable eq 'absent' or $present_in_stable eq 'fixed')) {
$present_in_stable = 'FALSE';
} else {
@@ -305,7 +314,7 @@
$bug{severity}, $bug{originator}, $submitter_name, $submitter_email, $bug{owner},
$owner_name, $owner_email, $bug{done}, $done_name, $done_email, $bug{subject},
$bug{forwarded}, $bug{log_modified},
- $present_in_stable, $present_in_testing, $present_in_unstable, $present_in_experimental) or die $!;
+ $present_in_oldstable, $present_in_stable, $present_in_testing, $present_in_unstable, $present_in_experimental) or die $!;
my $src;
foreach my $pkg (keys %{{ map { $_ => 1 } split(/\s*[, ]\s*/, $bug{package})}}) {
Modified: udd/web/bugs.cgi
===================================================================
--- udd/web/bugs.cgi 2011-02-07 08:51:56 UTC (rev 1906)
+++ udd/web/bugs.cgi 2011-02-08 22:24:57 UTC (rev 1907)
@@ -14,6 +14,7 @@
['wheezy_not_sid', 'wheezy, not sid', 'id in (select id from bugs_rt_affects_testing) and id not in (select id from bugs_rt_affects_unstable)'],
['sid_not_wheezy', 'sid, not wheezy', 'id in (select id from bugs_rt_affects_unstable) and id not in (select id from bugs_rt_affects_testing)'],
['squeeze', 'squeeze', 'id in (select id from bugs_rt_affects_stable)'],
+ ['lenny', 'lenny', 'id in (select id from bugs_rt_affects_oldstable)'],
['any', 'any', 'id in (select id from bugs where status!=\'done\')'],
]
More information about the Collab-qa-commits
mailing list