[Collab-qa-commits] r377 - svnbuildstat/script
goneri-guest at alioth.debian.org
goneri-guest at alioth.debian.org
Sat Aug 11 01:39:01 UTC 2007
Author: goneri-guest
Date: 2007-08-11 01:39:01 +0000 (Sat, 11 Aug 2007)
New Revision: 377
Modified:
svnbuildstat/script/svnbuildstat_update-db.pl
Log:
-fetch the TODO, the pending bugs and the last changelog entry
-initialise the supported arch for the package
Modified: svnbuildstat/script/svnbuildstat_update-db.pl
===================================================================
--- svnbuildstat/script/svnbuildstat_update-db.pl 2007-08-10 23:33:50 UTC (rev 376)
+++ svnbuildstat/script/svnbuildstat_update-db.pl 2007-08-11 01:39:01 UTC (rev 377)
@@ -156,7 +156,16 @@
my $svndebrelease;
my $tarballuri;
my $rev = getRev($uri);
+ my $todo;
+ my $currentpendingbug;
+ my $currentchangelogentry;
+# arch
+ my $i386;
+ my $powerpc;
+ my $sparc;
+ my $amd64;
+
return unless $rev;
my @control = `svn cat $uri/debian/control`;
@@ -178,6 +187,12 @@
}
}
+ } elsif (/^Architecture: (.*)/) {
+ my $arch = $1;
+ $i386 = 1 if $arch =~ /(any|all|i386)/;
+ $powerpc = 1 if $arch =~ /(any|all|powerpc)/;
+ $sparc = 1 if $arch =~ /(any|all|sparc)/;
+ $amd64 = 1 if $arch =~ /(any|all|amd64)/;
}
}
if (!$packagesrc) {
@@ -192,6 +207,18 @@
$svndebrelease = $1;
+ foreach (@changelog) {
+ last if /^\S/ && $currentchangelogentry;
+ $currentchangelogentry .= $_;
+
+ # looks for bug closed in the changelog
+ my ($tmp) = $_ =~ /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig;
+ if ($tmp) {
+ $tmp =~ s/([A-Za-z]|#|:|\s)//g;
+ $currentpendingbug .= $tmp.',';
+ }
+ }
+
} else {
print "Parse error: $uri/debian/changelog\n";
@@ -199,6 +226,13 @@
}
+ my @todo = `svn cat $uri/debian/TODO`;
+ @todo = `svn cat $uri/debian/TODO.Debian` unless @todo;
+ @todo = `svn cat $uri/debian/todo` unless @todo;
+ if (@todo) {
+ $todo .= $_ foreach @todo;
+ }
+
my $package = $schema->resultset('Package')->find_or_create({name => $packagesrc});
$package->update_from_related('repository_id',$$repository);
$package->svndebrelease ($svndebrelease);
@@ -250,6 +284,14 @@
$package->isuptodate($uscandata->{isuptodate});
$package->upstreamrelease($uscandata->{upstreamrelease});
$package->isindebian($ondebiandata->{isindebian});
+
+ $package->i386($i386);
+ $package->powerpc($powerpc);
+ $package->sparc($sparc);
+ $package->amd64($amd64);
+ $package->todo($todo);
+ $package->currentchangelogentry($currentchangelogentry);
+ $package->currentpendingbug($currentpendingbug);
print "->".$package->name."\n";
$package->lastcheck('now');
$package->update();
@@ -317,7 +359,7 @@
########## THREAD POOLS #####
$poolImportPkg = Thread::Pool::Simple->new(
min => 5,
- max => 10,
+ max => 5,
load => 3,
do => [\&importPkg],
lifespan => 1
More information about the Collab-qa-commits
mailing list