r2763 - people/goneri/SvnBuildStat-WWW/script
Gonéri Le Bouder
goneri-guest at alioth.debian.org
Wed May 30 08:55:36 UTC 2007
Author: goneri-guest
Date: 2007-05-30 08:55:36 +0000 (Wed, 30 May 2007)
New Revision: 2763
Modified:
people/goneri/SvnBuildStat-WWW/script/svnbuildstat_update-bugs.pl
Log:
Fix some error with ldif parsing
Modified: people/goneri/SvnBuildStat-WWW/script/svnbuildstat_update-bugs.pl
===================================================================
--- people/goneri/SvnBuildStat-WWW/script/svnbuildstat_update-bugs.pl 2007-05-30 06:28:41 UTC (rev 2762)
+++ people/goneri/SvnBuildStat-WWW/script/svnbuildstat_update-bugs.pl 2007-05-30 08:55:36 UTC (rev 2763)
@@ -26,7 +26,7 @@
while( my $package = $package_rs->next) {
$currentPackage{$package->name} = 1;
}
-my $tmpfile = "/tmp/fullindex";
+my $tmpfile = "/tmp/fullindex".$$;
unlink $tmpfile;
die if (!is_success( getstore("http://qa.debian.org/data/bts2ldap/fullindex", $tmpfile)));
@@ -39,19 +39,19 @@
LINE: while (my $line = readline BTS2LDAP) {
if ($line =~ /^$/) {
if ($h{debbugsSourcePackage} && exists ($currentPackage{$h{debbugsSourcePackage}})) {
- next LINE if $h{debbugsTag} && $h{debbugsTag} =~ /(pending|wontfix|unreproducible|moreinfo)/;
- next LINE if $h{debbugsState} !~ /open/;
+ if (!($h{debbugsTag} && $h{debbugsTag} =~ /(pending|wontfix|unreproducible|moreinfo)/)&& $h{debbugsState} =~ /open/) {
- my $package = $schema->resultset('Package')->search({name => $h{debbugsSourcePackage}})->first;
- my $severity = $schema->resultset('Severity')->find_or_create({name=>$h{debbugsSeverity}});
- my $bug = $schema->resultset('Bug')->find_or_create({bug_id => $h{debbugsID}});
+ my $package = $schema->resultset('Package')->search({name => $h{debbugsSourcePackage}})->first;
+ my $severity = $schema->resultset('Severity')->find_or_create({name=>$h{debbugsSeverity}});
+ my $bug = $schema->resultset('Bug')->find_or_create({bug_id => $h{debbugsID}});
- $bug->severity_id ($severity->id);
- $bug->package_id ($package->id);
- $bug->name ($h{debbugsTitle});
- $bug->update;
+ $bug->severity_id ($severity->id);
+ $bug->package_id ($package->id);
+ $bug->name ($h{debbugsTitle});
+ $bug->update;
- $registredPackage{$h{debbugsID}} = 1;
+ $registredPackage{$h{debbugsID}} = 1;
+ }
}
%h = ();
}
@@ -62,7 +62,7 @@
}
close BTS2LDAP;
-#my $bug_rs = $schema->resultset('Bug');
-#while( my $bug = $bug_rs->next) {
-# $bug->delete unless exists ($registredPackage{$bug->id});
-#}
+my $bug_rs = $schema->resultset('Bug');
+while( my $bug = $bug_rs->next) {
+ $bug->delete unless exists ($registredPackage{$bug->id});
+}
More information about the Pkg-games-commits
mailing list