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.
This commit is contained in:
Tim D. Smith 2017-05-06 15:54:56 -07:00
parent 6edf9382bc
commit 22d3a67b73

View File

@ -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