should setting user-prefix in ~/.cabal/config work? #197

Closed
bos opened this Issue May 24, 2012 · 4 comments

Projects

None yet

1 participant

@bos
Contributor
bos commented May 24, 2012

(Imported from Trac #204, reported by guest on 2008-01-06)

Setting user-prefix in .cabal/config leads to the following error:

wolverian@puni:~$ cabal info xmonad
Warning: Error parsing config file /home/wolverian/.cabal/config: On line 5: Parse of field 'prefix' failed:
Warning: Using default configuration.
I don't think the file format is documented anywhere, but a bit of

poking in the source and a Google led me to believe that this should
work.

My config file looks like this:

wolverian@puni:~$ cat .cabal/config
compiler: GHC
repos: hackage.haskell.org:http://hackage.haskell.org/packages/archive
cachedir: "/home/wolverian/.cabal/packages"
user-install: true
user-prefix: "/home/wolverian"
hackage-username: ""
hackage-password: ""
This is with up-to-date (as of today) Cabal and cabal-install from Darcs:
wolverian@puni:~$ cabal --version
cabal-install version 0.4.1
using version 1.3.2 of the Cabal library
And my GHC is a local (in ~) GHC 6.8.2:
wolverian@puni:~$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
--

wolverian

ilmari.vacklin@…

@bos
Contributor
bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-01-06)

That is indeed supposed to work. We'll have to investigate.

@bos
Contributor
bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-01-06)

Ah, I see. The problem is that user-prefix: does work and just prefix: does not. That's a recent unintentional change. So the default config file that was generated previously that used just prefix: is now getting rejected.

@bos
Contributor
bos commented May 24, 2012

(Imported comment by guest on 2008-01-12)

The version I was running at the time of reporting rejected both forms. I'll try upgrading to the latest Darcs soon.

@bos
Contributor
bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-01-14)

It's working for me with the current darcs version so long at the user-prefix path is quoted. In your example you do have it quoted so I don't know what problem you ran into exactly. I'm changing that to be consistent with the .cabal format which allows quoted or unquoted paths.

The error in the error message, that it reports "prefix" rather than "user-preifx" is an artifact of the current config parser that I don't intend to fix because the whole thing is going to be replaced shortly.

If you still see this problem, reopen this ticket.

@bos bos closed this May 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment