diff options
author | Noah Misch <noah@leadboat.com> | 2015-07-29 22:48:25 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2015-07-29 22:48:25 -0400 |
commit | d69252285c618cf2e4bf660dbae7c6f4d15e9ce4 (patch) | |
tree | d50571f0a63225c10bb2f2a9a48922fadc1f865d /src | |
parent | 2cd40adb85d1d5a7fd448721b326e73c1e318750 (diff) | |
download | postgresql-d69252285c618cf2e4bf660dbae7c6f4d15e9ce4.tar.gz postgresql-d69252285c618cf2e4bf660dbae7c6f4d15e9ce4.zip |
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 commit 9fa8b0ee90c44c0f97d16bf65e94322988c94864
broke it unnoticed, and commit dcae5faccab64776376d354decda0017c648bb53
fixed it unnoticed. Back-patch to 9.5 only; use of temporary
installations is unlikely to change in released versions.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/msvc/Install.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index b592f997f6c..f9557254a4b 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -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"; |