[Haskell-cafe] Re: Completely confused by cabal
barsoap at web.de
Sun Mar 22 07:19:36 EDT 2009
Colin Paul Adams <colin at colina.demon.co.uk> wrote:
> Achim> uh... because you're a mere user and don't have the rights
> Achim> to do so?
> No, I own the machine.
Well, but it neither knows nor cares, unless you log in as root.
"colin" isn't allowed to write to /usr/local/lib/ghc-6.11.20090319/ .
root's and colin's home directories are distinct, as well, that's why
both need to do cabal update to install stuff: Users can't read root
(or any other user's) home directories; root could read colin's home
directory, but musn't trust any data in it, as colin could use that
trust to weasel root access.
> I can't. It doesn't provide up-to-date ghc and things.
<insert snappy switch-to-gentoo comment here>
> Achim> programs with your user account, inside your home
> Achim> directory, is perfectly acceptable (and traditional) under
> Achim> unix.
> But it means I have to install everyhting twice - once as --user, once
> as --global.
No, you don't, the database ghc uses to compile stuff is a union of
both databases, user installs overriding global installs. Assuming that
you're the machine's only user, you only ever need to install stuff as
ksf at solaris ~ % ghc-pkg list
Cabal-18.104.22.168, HTTP-3001.1.4, QuickCheck-22.214.171.124,
QuickCheck-126.96.36.199, X11-1.4.4, X11-xft-0.3, array-0.2.0.0,
base-188.8.131.52, base-184.108.40.206, binary-0.4.4, bytestring-0.9.1.4,
cairo-0.10.0, containers-0.2.0.0, directory-220.127.116.11,
editline-0.2.1.0, filepath-18.104.22.168, filepath-22.214.171.124, gconf-0.10.0,
(ghc-6.10.1), ghc-paths-0.1.0.5, ghc-prim-0.1.0.0, glade-0.10.0,
glib-0.10.0, gtk-0.10.0, gtkglext-0.10.0, gtksourceview2-0.10.0,
haddock-2.4.1, haskell-src-126.96.36.199, haskell98-188.8.131.52, hpc-0.5.0.2,
html-184.108.40.206, integer-0.1.0.0, mozembed-0.10.0, mtl-220.127.116.11,
network-18.104.22.168, old-locale-22.214.171.124, old-time-126.96.36.199,
packedstring-0.1.0.1, parsec-3.0.0, pretty-188.8.131.52,
process-184.108.40.206, random-220.127.116.11, readline-18.104.22.168,
regex-base-0.93.1, regex-compat-0.92, regex-posix-0.93.2, rts-1.0,
soegtk-0.10.0, stm-22.214.171.124, svgcairo-0.10.0, syb-0.1.0.0,
template-haskell-126.96.36.199, unix-188.8.131.52, utf8-string-0.3.3,
MemoTrie-0.4.3, bytestring-mmap-0.2.0, bytestring-trie-0.1.4,
extensible-exceptions-0.1.1.0, ipprint-0.3, iteratee-0.1.1,
I basically did emerge cabal-install to bootstrap my installation, then
emerge gtk2hs as it's not available via hackage. Then, I install what
I need to hack as user using cabal install. (I recently nuked my
~/.cabal and ~/.ghc, that's why the user database is that small).
Installing ghc as user works equally well.
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.
More information about the Haskell-Cafe