Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

uninstall-hs should check that system has greator version of GHC or not #61

Open
r0ml opened this issue Mar 21, 2014 · 0 comments
Open

Comments

@r0ml
Copy link

r0ml commented Mar 21, 2014

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.

For example:

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 7.4.0.20111219 --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//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.

@r0ml r0ml added this to the 2012.4.0.0 Release milestone Mar 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants