Skip to content

Commit

Permalink
Include ipv6 info in the reports
Browse files Browse the repository at this point in the history
  • Loading branch information
rgeissert committed Aug 28, 2014
1 parent 4ffe1c0 commit d1ce78f
Showing 1 changed file with 43 additions and 36 deletions.
79 changes: 43 additions & 36 deletions build-report.pl
Expand Up @@ -57,47 +57,54 @@
print "Mirrors db report\n";
print "=================\n";

for my $id (sort keys %{$db->{'all'}}) {
my $mirror = $db->{'all'}{$id};
my @mirror_types;
for my $ipv (sort keys %{$db}) {
next unless (ref($db->{$ipv}) && exists($db->{$ipv}{'all'}));

print "\nMirror: $mirror->{site}\n";
my $postfix = '';
$postfix = "-$ipv" if ($ipv ne 'ipv4');

for my $k (keys %$mirror) {
next unless ($k =~ m/^(.+)-http$/);
push @mirror_types, $1;
}
for my $type (sort @mirror_types) {
$print_note_block = 1;
print "- Type: $type\n";
print " Status: ",(exists($mirror->{"$type-disabled"})?"disabled":"enabled"),"\n";
print " State: ",(($mirror->{"$type-state"} eq "syncing")?"syncing":"synced"),"\n"
if (defined($mirror->{"$type-state"}));
print " Path: ",$mirror->{"$type-http"},"\n";

foreach my $k (sort keys (%tags_bad)) {
print_note $tags_bad{$k}
if (exists($mirror->{$type.'-'.$k}));
}
for my $id (sort keys %{$db->{'all'}}) {
my $mirror = $db->{'all'}{$id};
my @mirror_types;

print "\nMirror: $mirror->{site}$postfix\n";

foreach my $k (sort keys (%tags_good)) {
print_note $tags_good{$k}
if (!exists($mirror->{$type.'-'.$k}));
for my $k (keys %$mirror) {
next unless ($k =~ m/^(.+)-http$/);
push @mirror_types, $1;
}
for my $type (sort @mirror_types) {
$print_note_block = 1;
print "- Type: $type\n";
print " Status: ",(exists($mirror->{"$type-disabled"})?"disabled":"enabled"),"\n";
print " State: ",(($mirror->{"$type-state"} eq "syncing")?"syncing":"synced"),"\n"
if (defined($mirror->{"$type-state"}));
print " Path: ",$mirror->{"$type-http"},"\n";

foreach my $k (sort keys (%tags_bad)) {
print_note $tags_bad{$k}
if (exists($mirror->{$type.'-'.$k}));
}

foreach my $k (sort keys (%tags_good)) {
print_note $tags_good{$k}
if (!exists($mirror->{$type.'-'.$k}));
}

for my $key (keys %{$mirror}) {
next unless ($key =~ m/^\Q$type-\E/);
if ($key =~ m/^\Q$type-\E(.+?)(-trace)?-disabled$/) {
my $arch = $1;
next if (exists($mirror->{$type.'-archcheck-disabled'}));
next unless (exists($db->{$type}{'arch'}{$arch}));

# If disabled by trace file:
if (defined($2)) {
print_note "Dropped architecture: $arch, but listed";
# Don't report it twice:
} elsif (!exists($mirror->{"$type-$arch-trace-disabled"})) {
print_note "Missing architecture: $arch, but listed";
for my $key (keys %{$mirror}) {
next unless ($key =~ m/^\Q$type-\E/);
if ($key =~ m/^\Q$type-\E(.+?)(-trace)?-disabled$/) {
my $arch = $1;
next if (exists($mirror->{$type.'-archcheck-disabled'}));
next unless (exists($db->{$type}{'arch'}{$arch}));

# If disabled by trace file:
if (defined($2)) {
print_note "Dropped architecture: $arch, but listed";
# Don't report it twice:
} elsif (!exists($mirror->{"$type-$arch-trace-disabled"})) {
print_note "Missing architecture: $arch, but listed";
}
}
}
}
Expand Down

0 comments on commit d1ce78f

Please sign in to comment.