mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-07 01:16:50 +02:00
MSVC: Future-proof installation file skip logic.
This code relied on knowing exactly where in the source tree temporary installations might appear. A reasonable hacker may not think to update this code when adding use of a temporary installation, making it fragile. Observe that commit9fa8b0ee90
broke it unnoticed, and commitdcae5facca
fixed it unnoticed. Back-patch to 9.5 only; use of temporary installations is unlikely to change in released versions.
This commit is contained in:
parent
43797ed42a
commit
f7dca86fc3
@ -98,6 +98,9 @@ sub Install
|
||||
{ wanted => sub {
|
||||
/^.*\.sample\z/s
|
||||
&& push(@$sample_files, $File::Find::name);
|
||||
|
||||
# Don't find files of in-tree temporary installations.
|
||||
$_ eq 'share' and $File::Find::prune = 1;
|
||||
}
|
||||
},
|
||||
@top_dir);
|
||||
@ -152,6 +155,9 @@ sub Install
|
||||
{ wanted => sub {
|
||||
/^(.*--.*\.sql|.*\.control)\z/s
|
||||
&& push(@$pl_extension_files, $File::Find::name);
|
||||
|
||||
# Don't find files of in-tree temporary installations.
|
||||
$_ eq 'share' and $File::Find::prune = 1;
|
||||
}
|
||||
},
|
||||
@pldirs);
|
||||
@ -199,8 +205,6 @@ sub CopySetOfFiles
|
||||
print "Copying $what" if $what;
|
||||
foreach (@$flist)
|
||||
{
|
||||
next if /regress/; # Skip temporary install in regression subdir
|
||||
next if /ecpg.test/; # Skip temporary install in regression subdir
|
||||
my $tgt = $target . basename($_);
|
||||
print ".";
|
||||
lcopy($_, $tgt) || croak "Could not copy $_: $!\n";
|
||||
|
Loading…
Reference in New Issue
Block a user