[Collab-qa-commits] r1208 - buildstat/trunk/buildstat-server/lib/SvnBuildStat/Controller
goneri at alioth.debian.org
goneri at alioth.debian.org
Wed Sep 3 21:37:26 UTC 2008
Author: goneri
Date: 2008-09-03 21:37:24 +0000 (Wed, 03 Sep 2008)
New Revision: 1208
Modified:
buildstat/trunk/buildstat-server/lib/SvnBuildStat/Controller/Controls.pm
Log:
remove the apt-get target
Modified: buildstat/trunk/buildstat-server/lib/SvnBuildStat/Controller/Controls.pm
===================================================================
--- buildstat/trunk/buildstat-server/lib/SvnBuildStat/Controller/Controls.pm 2008-09-03 21:36:52 UTC (rev 1207)
+++ buildstat/trunk/buildstat-server/lib/SvnBuildStat/Controller/Controls.pm 2008-09-03 21:37:24 UTC (rev 1208)
@@ -154,29 +154,7 @@
changelogentry.id=qajob.changelogentry_id
AND
qajob.qatool_id=".$qatool->id."
-WHERE
- build.changelogentry_id=changelogentry.id
- AND
- changelogentry.dscuri IS NOT NULL
- ORDER BY
- lastjobstart IS NOT NULL,
- lastjobstart
- LIMIT 1";
-
- $request{binary} = "
-
-SELECT changelogentry.id AS changelogentry_id,
- changelogentry.changesuri AS changesuri,
- build.id AS build_id
-FROM
- changelogentry
LEFT JOIN
- qajob
- ON
- qajob.qatool_id=".$qatool->id."
- AND
- changelogentry.id=qajob.changelogentry_id
- LEFT JOIN
build
ON
build.changelogentry_id=changelogentry.id
@@ -193,17 +171,18 @@
ON
vcs.id=repository.vcs_id
WHERE
- vcs.name<>'apt' AND build.changelogentry_id=changelogentry.id AND isbuildok=true AND changelogentry.changesuri IS NOT NULL
+ build.changelogentry_id=changelogentry.id
+ AND
+ changelogentry.dscuri IS NOT NULL
ORDER BY
lastjobstart IS NOT NULL,
lastjobstart
- LIMIT 1
+ LIMIT 1";
-";
+ $request{binary} = "
- $request{'apt-get'} = "
-
-SELECT changelogentry.id AS changelogentry_id,
+SELECT
+ changelogentry.id AS changelogentry_id,
changelogentry.changesuri AS changesuri,
build.id AS build_id,
vcs.name AS vcs_name,
@@ -238,7 +217,9 @@
ON
repositoryentry.sourcepackage_id=sourcepackage.id
WHERE
- vcs.name='apt'
+ (( vcs.name='apt' )
+ OR
+ ( build.changelogentry_id=changelogentry.id AND isbuildok=true AND changelogentry.changesuri IS NOT NULL ))
ORDER BY
lastjobstart IS NOT NULL,
lastjobstart
@@ -247,16 +228,14 @@
";
-
print STDERR $params->{target}."\n";
-print "--->".$request{$params->{target}}."\n";
my $hashref = $dbh->selectrow_hashref($request{$params->{target}});
die unless $hashref;
my $cookie = int (rand(0xfffffff));
my $changelogentry = $c->model('SvnBuildStat::Model::DB::Changelogentry')->search({id => $hashref->{changelogentry_id}})->first;
die unless $changelogentry;
- # die unless $c->config->{path}->{weburi}; TODO
+ # die unless $c->config->{path}->{weburi}; TODO
my $ret;
@@ -273,7 +252,7 @@
$qajob->update;
$ret .= "qajob_id=".$qajob->id."\ndsc=".$hashref->{dscuri}."\n";
-
+
} elsif ($params->{target} eq 'binary') {
$qajob = $c->model('SvnBuildStat::Model::DB::Qajob')->find_or_create(
@@ -285,23 +264,14 @@
$qajob->lastjobstart("NOW");
$qajob->update;
- $ret .= "changesuri=".$hashref->{changesuri}."\n";
+ if ($hashref->{'vcs_name'}) {
+ $ret .= "sourcepackage_name=".$hashref->{sourcepackage_name}."\n";
+ $ret .= "apt=".$hashref->{repository_uri}."\n";
+ } else {
+ $ret .= "changesuri=".$hashref->{changesuri}."\n";
- $ret .= "qajob_id=".$qajob->id."\n";
+ }
- } elsif ($params->{target} eq 'apt-get') {
-
- $qajob = $c->model('SvnBuildStat::Model::DB::Qajob')->find_or_create(
- qatool_id => $qatool->id,
- changelogentry_id => $hashref->{changelogentry_id},
- );
- $qajob->cookie($cookie);
- $qajob->lastjobstart("NOW");
- $qajob->update;
-
- $ret .= "sourcepackage_name=".$hashref->{sourcepackage_name}."\n";
- $ret .= "apt=".$hashref->{repository_uri}."\n";
-
$ret .= "qajob_id=".$qajob->id."\n";
}
More information about the Collab-qa-commits
mailing list