Am 19.07.2016 um 20:56 schrieb Jean-Louis Martineau:
> We could add a property so that it use all the available child changer,
> eg. fail only if all child fail.
>
> For testing, you can try to remove all
> if (grep { defined($_->[0]) } @$kid_results) {
> ...
> }
> block of code
JL, I was curious and tried that right now.
Did not work yet, amcheck fails the same way.
--- aggregate.pm.orig 2016-07-19 21:28:05.000000000 +0200
+++ aggregate.pm 2016-07-19 21:30:58.000000000 +0200
@@ -288,7 +288,6 @@
my $check_and_report_errors = sub {
my ($kid_results) = @_;
- if (grep { defined($_->[0]) } @$kid_results) {
# we have errors, so collect them and make a "combined" error.
my @annotated_errs;
my @err_slots;
@@ -299,7 +298,6 @@
[ $self->{'child_names'}[$i], $kr->[0] ];
push @err_slots, $kr->[0]->{'slot'}
if (defined $kr->[0] and defined $kr->[0]->{'slot'});
- }
my @slotarg;
if (@err_slots == $self->{'num_children'}) {
@@ -413,7 +411,6 @@
my $all_kids_done_cb = sub {
my ($kid_results) = @_;
- if (grep { defined($_->[0]) } @$kid_results) {
# we have errors, so collect them and make a "combined"
error.
my @annotated_errs;
for my $i (0 .. $self->{'num_children'}-1) {
@@ -421,7 +418,6 @@
next unless defined($kr->[0]);
push @annotated_errs,
[ $self->{'child_names'}[$i], $kr->[0] ];
- }
$self->make_combined_error(
$params{'finished_cb'}, [ @annotated_errs ]);
return 1;
@@ -496,7 +492,6 @@
my $all_kids_done_cb = sub {
my ($kid_results) = @_;
- if (grep { defined($_->[0]) } @$kid_results) {
# we have errors, so collect them and make a "combined" error.
my @annotated_errs;
for my $i (0 .. $self->{'num_children'}-1) {
@@ -504,7 +499,6 @@
next unless defined($kr->[0]);
push @annotated_errs,
[ $self->{'child_names'}[$i], $kr->[0] ];
- }
$self->make_combined_error(
$params{'finished_cb'}, [ @annotated_errs ]);
return 1;
@@ -555,7 +549,6 @@
step all_kids_done_cb => sub {
my ($kid_results) = @_;
- if (grep { defined($_->[0]) } @$kid_results) {
# we have errors, so collect them and make a "combined" error.
my @annotated_errs;
for my $i (0 .. $self->{'num_children'}-1) {
@@ -563,7 +556,6 @@
next unless defined($kr->[0]);
push @annotated_errs,
[ $self->{'child_names'}[$i], $kr->[0] ];
- }
return $self->make_combined_error(
$params{'inventory_cb'}, [ @annotated_errs ]);
}