2014.2.0.0 alphas

Mark Lentczner mark.lentczner at gmail.com
Sun Jul 20 02:13:32 BST 2014


I'm having a good hard look at this... and not sure what to do!

On Fri, Jul 11, 2014 at 3:01 PM, George Colpitts <george.colpitts at gmail.com>
wrote:

> Some minor issues with the uninstall:
>
>  sudo uninstall-hs thru 7.8.2 --remove
> Password:
> -- Removing version 7.8.2 and earlier
> bash-3.2$ ghc --version
> /usr/local/bin/ghc: line 9: /usr/local/lib/ghc-7.8.2/bin/ghc: No such file
> or directory
> /usr/local/bin/ghc: line 9: exec: /usr/local/lib/ghc-7.8.2/bin/ghc: cannot
> execute: No such file or directory
>
...

> bash-3.2$ ls -l /usr/local/bin/*ghc*
> lrwxr-xr-x  1 gcolpitts  admin    9 Apr 12 14:35 /usr/local/bin/ghc ->
> ghc-7.8.2
> -rwxr-xr-x  1 gcolpitts  admin  262 Apr  9 12:16 /usr/local/bin/ghc-7.8.1
> -rwxr-xr-x  1 gcolpitts  admin  262 Apr 12 14:35 /usr/local/bin/ghc-7.8.2
> lrwxr-xr-x  1 gcolpitts  admin   13 Apr 12 14:35 /usr/local/bin/ghc-pkg ->
> ghc-pkg-7.8.2
> -rwxr-xr-x  1 gcolpitts  admin  294 Apr  9 12:16
> /usr/local/bin/ghc-pkg-7.8.1
> -rwxr-xr-x  1 gcolpitts  admin  294 Apr 12 14:35
> /usr/local/bin/ghc-pkg-7.8.2
> lrwxr-xr-x  1 gcolpitts  admin   10 Apr 12 14:35 /usr/local/bin/ghci ->
> ghci-7.8.2
> -rwxr-xr-x  1 gcolpitts  admin   66 Apr  9 12:15 /usr/local/bin/ghci-7.8.1
> -rwxr-xr-x  1 gcolpitts  admin   66 Apr 12 14:35 /usr/local/bin/ghci-7.8.2
> -rwxr-xr-x  1 gcolpitts  admin  253 Apr  9 12:16
> /usr/local/bin/haddock-ghc-7.8.1
> -rwxr-xr-x  1 gcolpitts  admin  253 Apr 12 14:35
> /usr/local/bin/haddock-ghc-7.8.2
> lrwxr-xr-x  1 gcolpitts  admin   12 Apr 12 14:35 /usr/local/bin/runghc ->
> runghc-7.8.2
> -rwxr-xr-x  1 gcolpitts  admin  245 Apr  9 12:16
> /usr/local/bin/runghc-7.8.1
> -rwxr-xr-x  1 gcolpitts  admin  245 Apr 12 14:35
> /usr/local/bin/runghc-7.8.2
> bash-3.2$ rm /usr/local/bin/*ghc*
>

Turns out the uninstaller assumes that a ghc version will be installed
entirely under some directory, and then the items in ghc's bin dir will be
symlinked to from some dir on the user's PATH (it also always looks at
/usr/bin and /usr/local/bin).

But here, it seems your bindists for 7.8.1 and 7.8.2 were ./configure
--preifx=/usr/local  - which means that the stuff in /usr/local *was* the
actual ghc bin dir, not symlinks to it.

I'm queasy about having uninstall-hs remove installs like this: It doesn't
really know what bin entries are part of GHC, and it seems a bit scary to
rm things in /usr/bin or /usr/local/bin without being sure.

Note that in this kind of install (--prefix=/usr/local) there are bits of
the GHC interleaved into common directories (/usr/local/share/man, for
example), parts that are not disambiguated by version
(/usr/local/share/doc/ghc will just have the the doc for the last version
you installed), and elements that don't name ghc at all
(/usr/local/bin/hpc). This would be all hard to clean up without knowing,
for sure, what each version of GHC happened to install.

Right now the uninstaller does find the versioned directory under
/usr/local/lib... but it won't clean up the rest of the corresponding
stuff. Any good ideas? I'm inclined to a) leave it as it is, b) suggest
that we somewhere have a warning against using /usr/local or /usr as the
--prefix when configuring a bindist of GHC.

- Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/haskell-platform/attachments/20140719/810d6313/attachment.htm>


More information about the Haskell-platform mailing list