/[collab-qa]/udd/udd/bugs_gatherer.pl
ViewVC logotype

Diff of /udd/udd/bugs_gatherer.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1906 by lucas, Sun Feb 21 11:09:22 2010 UTC revision 1907 by lucas, Tue Feb 8 22:24:57 2011 UTC
# Line 180  sub run { Line 180  sub run {
180          my $location = $src_config{archived} ? 'archive' : 'db_h';          my $location = $src_config{archived} ? 'archive' : 'db_h';
181          $table = $src_config{archived} ? $archived_table : $table;          $table = $src_config{archived} ? $archived_table : $table;
182          # Read all bugs          # Read all bugs
183          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)");
184          my $insert_bugs_packages_handle = $dbh->prepare("INSERT INTO ${table}_packages (id, package, source) VALUES (\$1, \$2, \$3)");          my $insert_bugs_packages_handle = $dbh->prepare("INSERT INTO ${table}_packages (id, package, source) VALUES (\$1, \$2, \$3)");
185          my $insert_bugs_found_handle = $dbh->prepare("INSERT INTO ${table}_found_in (id, version) VALUES (\$1, \$2)");          my $insert_bugs_found_handle = $dbh->prepare("INSERT INTO ${table}_found_in (id, version) VALUES (\$1, \$2)");
186          my $insert_bugs_fixed_handle = $dbh->prepare("INSERT INTO ${table}_fixed_in (id, version) VALUES (\$1, \$2)");          my $insert_bugs_fixed_handle = $dbh->prepare("INSERT INTO ${table}_fixed_in (id, version) VALUES (\$1, \$2)");
# Line 253  sub run { Line 253  sub run {
253                  }                  }
254    
255                  #Calculate bug presence in distributions                  #Calculate bug presence in distributions
256                  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);
257                  if($src_config{archived}) {                  if($src_config{archived}) {
258                          $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';
259                  } else {                  } else {
260                            $present_in_oldstable =
261                                    bug_presence(bug => $bug_nr, status => \%bug,
262                                                             dist => 'oldstable',
263                                                             arch => \@archs);
264                          $present_in_stable =                          $present_in_stable =
265                                  bug_presence(bug => $bug_nr, status => \%bug,                                  bug_presence(bug => $bug_nr, status => \%bug,
266                                                           dist => 'stable',                                                           dist => 'stable',
# Line 274  sub run { Line 278  sub run {
278                                                           dist => 'experimental',                                                           dist => 'experimental',
279                                                           arch => \@archs);                                                           arch => \@archs);
280    
281                          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)) {
282                                  print "NUMBER: $bug_nr\n";                                  print "NUMBER: $bug_nr\n";
283                          }                          }
284    
285                            if(defined($present_in_oldstable) and ($present_in_oldstable eq 'absent' or $present_in_oldstable eq 'fixed')) {
286                                    $present_in_oldstable = 'FALSE';
287                            } else {
288                                    $present_in_oldstable = 'TRUE';
289                            }
290                          if(defined($present_in_stable) and ($present_in_stable eq 'absent' or $present_in_stable eq 'fixed')) {                          if(defined($present_in_stable) and ($present_in_stable eq 'absent' or $present_in_stable eq 'fixed')) {
291                                  $present_in_stable = 'FALSE';                                  $present_in_stable = 'FALSE';
292                          } else {                          } else {
# Line 305  sub run { Line 314  sub run {
314                          $bug{severity}, $bug{originator}, $submitter_name, $submitter_email, $bug{owner},                          $bug{severity}, $bug{originator}, $submitter_name, $submitter_email, $bug{owner},
315                          $owner_name, $owner_email, $bug{done}, $done_name, $done_email, $bug{subject},                          $owner_name, $owner_email, $bug{done}, $done_name, $done_email, $bug{subject},
316                          $bug{forwarded}, $bug{log_modified},                          $bug{forwarded}, $bug{log_modified},
317                          $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 $!;
318    
319                  my $src;                  my $src;
320                  foreach my $pkg (keys %{{ map { $_ => 1 } split(/\s*[, ]\s*/, $bug{package})}}) {                  foreach my $pkg (keys %{{ map { $_ => 1 } split(/\s*[, ]\s*/, $bug{package})}}) {

Legend:
Removed from v.1906  
changed lines
  Added in v.1907

  ViewVC Help
Powered by ViewVC 1.1.5