From d3037f704482c3e024f9761cc8d07e286d4fed23 Mon Sep 17 00:00:00 2001 From: Vlad Shablinsky Date: Sun, 16 Aug 2015 17:16:44 +0300 Subject: update opt for renamed formula After the formula gets renamed oldname opt is created and it points to the linked keg. However if we then upgrade newname oldname opt still points to the same keg it pointed before upgrade. The commit fixes this behaviour thus that oldname opt links at the same keg opt point. --- Library/Homebrew/cmd/uninstall.rb | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index aa4c0d919..875c3ced7 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -18,15 +18,9 @@ module Homebrew # Remove every symlink that links to keg, because it can # be left by migrator links.each do |link| - old_opt = HOMEBREW_PREFIX/"opt/#{link.basename}" if link.exist? && link.realpath == keg.rack.realpath old_cellars << link end - - if old_opt.symlink? && old_opt.realpath.to_s == keg.to_s - old_opt.unlink - old_opt.parent.rmdir_if_possible - end end keg.unlink @@ -52,13 +46,6 @@ module Homebrew name = rack.basename links.each do |link| - old_opt = HOMEBREW_PREFIX/"opt/#{link.basename}" - if old_opt.symlink? && old_opt.exist? \ - && old_opt.realpath.parent == rack.realpath - old_opt.unlink - old_opt.parent.rmdir_if_possible - end - link.unlink if link.exist? && link.realpath == rack.realpath end -- cgit v1.2.3