diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-11-09 17:25:57 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-11-18 11:08:58 +0100 |
commit | c26a697bb0fc682eb6ae9f58c6372d8e19d482b2 (patch) | |
tree | 95acab7df8f74b7263221940fcf16dec659031ab /Porting/pod_lib.pl | |
parent | 852355fc8bd0e2a73e60ad29e169fe586d240117 (diff) | |
download | perl-c26a697bb0fc682eb6ae9f58c6372d8e19d482b2.tar.gz |
Flag to get_pod_metadata() whether generated files are expected.
This permits Porting/pod_rules.pl to be run from a clean checkout without
warning, which simplifies updating perl's version.
Diffstat (limited to 'Porting/pod_lib.pl')
-rw-r--r-- | Porting/pod_lib.pl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl index 684b4944a9..6caeb193d0 100644 --- a/Porting/pod_lib.pl +++ b/Porting/pod_lib.pl @@ -19,6 +19,8 @@ sub open_or_die { } sub get_pod_metadata { + # Do we expect to find generated pods on disk? + my $permit_missing_generated = shift; my %BuildFiles; foreach my $path (@_) { @@ -162,6 +164,14 @@ sub get_pod_metadata { my_die "could not find the pod listing of perl.pod\n" unless %perlpods; + # Are we running before known generated files have been generated? + # (eg in a clean checkout) + my %not_yet_there; + if ($permit_missing_generated) { + # If so, don't complain if these files aren't yet in place + %not_yet_there = (%manireadmes, %{$state{generated}}, %{$state{copies}}) + } + my @inconsistent; foreach my $i (sort keys %disk_pods) { push @inconsistent, "$0: $i exists but is unknown by buildtoc\n" @@ -174,7 +184,7 @@ sub get_pod_metadata { } foreach my $i (sort keys %our_pods) { push @inconsistent, "$0: $i is known by buildtoc but does not exist\n" - unless $disk_pods{$i} or $BuildFiles{$i}; + unless $disk_pods{$i} or $BuildFiles{$i} or $not_yet_there{$i}; } foreach my $i (sort keys %manipods) { push @inconsistent, "$0: $i is known by MANIFEST but does not exist\n" @@ -184,7 +194,8 @@ sub get_pod_metadata { } foreach my $i (sort keys %perlpods) { push @inconsistent, "$0: $i is known by perl.pod but does not exist\n" - unless $disk_pods{$i} or $BuildFiles{$i} or $cpanpods_leaf{$i}; + unless $disk_pods{$i} or $BuildFiles{$i} or $cpanpods_leaf{$i} + or $not_yet_there{$i}; } $state{inconsistent} = \@inconsistent; return \%state; |