Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.34k forks source link

sdl_mixer, sdl_ttf, and sdl_net do not uninstall fully #77

Closed KieranP closed 15 years ago

KieranP commented 15 years ago

I installed sdl_mixer. It got updated, I uninstalled and then reinstalled, but got an error:

% brew uninstall sdl_mixer
Uninstalling /opt/local/Cellar/sdl_mixer/1.2.8...
Pruned 4 symbolic links from /opt/local

% brew install sdl_mixer
==> Downloading http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.8.tar.gz
File already downloaded and cached
==> Patching
patching file configure.in
==> ./configure --prefix=/opt/local/Cellar/sdl_mixer/1.2.8 --includedir=/opt/local/Cellar/sdl_mixer/1.2.8/priv_include --disable-debug --disable-dependency-tracking --disable-music-native-midi
==> make install
==> Error: File exists - /opt/local/Cellar/sdl_mixer/1.2.8/priv_include/SDL/SDL_mixer.h or /opt/local/include/SDL/SDL_mixer.h
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/1.8/fileutils.rb:338:in `symlink'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/1.8/fileutils.rb:338:in `ln_s'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/1.8/fileutils.rb:1409:in `fu_each_src_dest0'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/1.8/fileutils.rb:336:in `ln_s'
/opt/local/Library/Formula/sdl_mixer.rb:30:in `install'
/opt/local/Library/Homebrew/install.rb:63:in `install'
/opt/local/Library/Homebrew/formula.rb:156:in `brew'
/opt/local/Library/Homebrew/formula.rb:288:in `stage'
/opt/local/Library/Homebrew/formula.rb:255:in `mktemp'
/opt/local/Library/Homebrew/formula.rb:286:in `stage'
/opt/local/Library/Homebrew/formula.rb:151:in `brew'
/opt/local/Library/Homebrew/install.rb:50:in `install'
/opt/local/Library/Homebrew/install.rb:140
/opt/local/Library/Formula/sdl_mixer.rb:15

sdl_* use a symlink hack which installs files into the SDL folder, which IMO.

However, if it's the only way, two new things needs to be put in place:

1) sdl_* needs to make use of a before_uninstall method of some sort. While making that method, an after_uninstall wouldn't be a bad idea either.

2) The dependson system needs to make it so you can't delete say sdl without deleting the sdl* files first.

i.e.

Cannot uninstall SDL because sdl_net, sdl_ttf and sdl_image rely on it. Please uninstall these first.

This should make sure SDL doesn't get deleted, and mess with the files of those other packages.

Thoughts?

adamv commented 15 years ago

Totally agree that this is a hack (since I'm the one who did those formulas) but don't have a better suggestion at the moment.

mxcl commented 15 years ago

Yeah I have ideas for fixing this hack. Will enact them soonish.

mxcl commented 15 years ago

Closed by 0b7e5cd4eb57445f941b1307d3bdb13d01ac90ec