Stop! Tickets are now managed at GitHub.
Please enter new tickets, and find and edit existing tickets there:
Ticket #190 (new defect)
uninstall-hs should check that system has greator version of GHC or not
|Reported by:||shelarcy||Owned by:||MtnViewMark|
uninstall-hs works well if system has only Haskell Platform version or prior version of GHC. But if system has greator version of GHC, uninstall-hs causes undesirable result.
My system already has GHC 7.2.2, I installed Haskell Platform 2011.4.0.0 (GHC 7.0.4), and then I installed GHC HEAD's binary pkg for testing. After testing, I tried to remove GHC HEAD by using uninstall-hs. uninstall-hs removes /usr/bin/ghc and /usr/bin/cabal symbolic link accidently.
$ sudo uninstall-hs only 7.5.20111221 --remove $ ghc -V-bash: /usr/bin/ghc: No such file or directory $ cabal -V cabal: unrecognised command: -v (try --help)
And uninsatll-hs can't parse GHC 7.4.1 RC 1's version.
$ sudo uninstall-hs only 184.108.40.20611219 --remove *** couldn't parse version Usage: uninstall-hs -- find versions on system uninstall-hs thru VERSION -- remove VERSION and earlier uninstall-hs only VERSION -- remove only VERSION uninstall-hs all -- remove all NOTE: Commands are 'dry run' by default and don't actually delete. Options (can appear anywhere): -v --verbose report each path -n --dry-run only report what would be removed -s --sh, --script generate a shell script to remove files -r --rm, --remove actually remove files -? --help help (this message)
Okay, /Library/Haskell/doc/start.html says that uninstall-hs can remove just current and prior version. But there is one more problem. My system was installed GHC 7.0.4, 7.2.2, and HEAD (7.5.20111221). So, if using GHC's uninstaller (/Library/Frameworks/GHC.framework/Versions/<version>/Tools/Uninstaller), /usr/bin/ghc is changes into GHC 7.2.2 instead of 7.0.4. This is undesirable result, too.
And same problem occur when uninstall-hs removes Haskell Platform's GHC 7.0.4 if system has greator version....
I think that uninstall-hs should check system has greator version of GHC or not in /Library/Frameworks/GHC.framework/Versions/ directory.