aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim D. Smith2017-05-06 15:54:56 -0700
committerTim D. Smith2017-05-06 15:56:55 -0700
commit22d3a67b73214727bf2deed06f90799e688c6af0 (patch)
tree570abb6e91e43f92653718998661e1deba9a6ab7
parent6edf9382bcc1240ad6f97c8b752cfe56cef9965d (diff)
downloadbrew-22d3a67b73214727bf2deed06f90799e688c6af0.tar.bz2
Relocate virtualenv orig-prefix.txt
Virtualenvs remember the path to the stdlib in a file named orig_prefix.txt. This file wasn't being relocated because Homebrew skips files that look like they're intended for human consumption by matching against the list of metafile extensions. This led to the bug described in https://github.com/Homebrew/homebrew-core/issues/12869. This fixes relocation by creating an exception for orig-prefix.txt.
-rw-r--r--Library/Homebrew/keg_relocate.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index 6044426ee..8c7d5b041 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -133,6 +133,7 @@ class Keg
files = Set.new path.find.reject { |pn|
next true if pn.symlink?
next true if pn.directory?
+ next false if pn.basename.to_s == "orig-prefix.txt" # for python virtualenvs
next true if Metafiles::EXTENSIONS.include?(pn.extname)
if pn.text_executable?
text_files << pn