From 88e8e6cf600f8b3c88f07e49b83c41f45beb023a Mon Sep 17 00:00:00 2001 From: "Tim D. Smith" Date: Thu, 13 Aug 2015 00:13:21 -0700 Subject: [PATCH] Don't try to link symlinks over their targets If we have lib/python3.4/site-packages, which is a symlink to HOMEBREW_PREFIX/lib/python3.4/site-packages, link will be confused. This only appears after unlinking and relinking because this symlink is created in post_install, which runs after the first link. Fixes Homebrew/linuxbrew#502. Closes Homebrew/homebrew#42891. --- Library/Homebrew/keg.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 6ab8d4c1eb..85b1305171 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -422,6 +422,7 @@ class Keg if src.symlink? || src.file? Find.prune if File.basename(src) == ".DS_Store" + Find.prune if src.realpath == dst # Don't link pyc files because Python overwrites these cached object # files and next time brew wants to link, the pyc file is in the way. if src.extname == ".pyc" && src.to_s =~ /site-packages/