[Haskell-cafe] Re: Completely confused by cabal
Achim Schneider
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
that user:
ksf at solaris ~ % ghc-pkg list
/usr/lib64/ghc-6.10.1/./package.conf:
Cabal-1.6.0.1, HTTP-3001.1.4, QuickCheck-1.2.0.0,
QuickCheck-2.1.0.1, X11-1.4.4, X11-xft-0.3, array-0.2.0.0,
base-3.0.3.0, base-4.0.0.0, binary-0.4.4, bytestring-0.9.1.4,
cairo-0.10.0, containers-0.2.0.0, directory-1.0.0.2,
editline-0.2.1.0, filepath-1.1.0.0, filepath-1.1.0.1, 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-1.0.1.3, haskell98-1.0.1.0, hpc-0.5.0.2,
html-1.0.1.2, integer-0.1.0.0, mozembed-0.10.0, mtl-1.1.0.2,
network-2.2.0.1, old-locale-1.0.0.1, old-time-1.0.0.1,
packedstring-0.1.0.1, parsec-3.0.0, pretty-1.0.1.0,
process-1.0.1.0, random-1.0.0.1, readline-1.0.1.0,
regex-base-0.93.1, regex-compat-0.92, regex-posix-0.93.2, rts-1.0,
soegtk-0.10.0, stm-2.1.1.2, svgcairo-0.10.0, syb-0.1.0.0,
template-haskell-2.3.0.0, unix-2.3.1.0, utf8-string-0.3.3,
zlib-0.5.0.0
/home/ksf/.ghc/x86_64-linux-6.10.1/package.conf:
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,
mmap-0.2, regex-posix-0.72.0.3
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
mailing list