aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
Diffstat (limited to 'ulri')
-rwxr-xr-xulri47
1 files changed, 47 insertions, 0 deletions
diff --git a/ulri b/ulri
index 45d48da..5787fc6 100755
--- a/ulri
+++ b/ulri
@@ -210,6 +210,7 @@ my $compildone = {};
my $todo = "$config->{queue}/todo";
my $failure = "$config->{queue}/failure";
my $done = "$config->{queue}/done";
+my $reject = "$config->{queue}/reject";
# Raise this when the noarch package starts to build on any bot
my %noarch_build;
@@ -276,6 +277,20 @@ sub todo_func {
'time' => $time
};
}
+
+ if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_([\w-]+)\.(\w+)\.(\w+)\.(\d{14})\.(\d+)\.deps$/) {
+ my ($prefix, $arch, $bot, $host, $date, $pid) = ($1, $2, $3, $4, $5, $6);
+
+ my @deps;
+
+ open my $FILE, "<$todo/$f/$m/$s/$r";
+ while(my $line = <$FILE>) {
+ chomp $line;
+ push @deps,$line;
+ }
+
+ $pkg_tree{$prefix}{deps} = @deps;
+ }
}
sub done_func {
@@ -509,6 +524,38 @@ foreach my $prefix (sort keys %pkg_tree) {
next if $later{$prefix};
my $ent = $pkg_tree{$prefix};
+
+ my $ready = 1;
+ my $failed_dep = 0;
+
+ foreach my $dep (@{$ent->{deps}}) {
+ if (glob "$done/*/*/*/$dep.upload") {
+ plog('DEBUG', "Dependent build $dep was uploaded");
+ next;
+ }
+ # $dep was not uploaded yet, so it's too early to build this one
+ $ready = 0;
+ if (glob "$reject/*/*/*/$dep.youri" || glob "$done/*/*/*/${dep}_*.fail") {
+ plog('ERROR', "Dependent build $dep has failed");
+ $failed_dep = 1;
+ }
+ }
+
+ if ($failed_dep) {
+ plog('DEBUG', "Dependent build(s) failed, rejecting this one");
+ foreach my $media (keys %{$ent->{media}}) {
+ my $path = $ent->{media}{$media}{path};
+ my $target = $ent->{target};
+ make_path("$reject/$path");
+ foreach my $srpm (@{$ent->{srpms}}) {
+ move("$todo/$path/${prefix}_$srpm","$reject/$path/${prefix}_$srpm");
+ }
+ }
+ next;
+ }
+
+ next unless $ready;
+
foreach my $media (keys %{$ent->{media}}) {
my $path = $ent->{media}{$media}{path};
my $target = $ent->{target};