[Hackage] #541: bootstrap.sh ignores PREFIX environment variable

#541: bootstrap.sh ignores PREFIX environment variable ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: Linux | ---------------------------------+------------------------------------------ bootstrap.sh breaks if PREFIX is not $HOME/.cabal. Patch (from git diff) below: {{{ diff --git a/bootstrap.sh b/bootstrap.sh index 79729af..29f2b65 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -132,7 +132,7 @@ install_pkg () { || die "Compiling the Setup script failed" [ -x Setup ] || die "The Setup script does not exist or cannot be run" - ./Setup configure --user "--prefix=${HOME}/.cabal" \ + ./Setup configure --user "--prefix=$PREFIX" \ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} \ ${EXTRA_CONFIGURE_OPTS} ${VERBOSE} \ || die "Configuring the ${PKG} package failed" }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/541 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#541: bootstrap.sh ignores PREFIX environment variable ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: major | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: Linux ---------------------------------+------------------------------------------ Changes (by nr): * severity: normal => major Comment: Followup: even with this patch, using {{{$PREFIX}}} does not work: a directory structure gets created in {{{$PREFIX}}}, but there is no config file, which results in this pain: {{{ : nr@homedog 5523 ; cabal install -v graphmod /usr/bin/ghc --numeric-version looking for package tool: ghc-pkg near compiler in /usr/bin found package tool in /usr/bin/ghc-pkg /usr/bin/ghc-pkg --version /usr/bin/ghc --supported-languages Reading installed packages... /usr/bin/ghc-pkg list Warning: No remote package servers have been specified. Usually you would have one specified in the config file. cabal: There is no package named graphmod : nr@homedog 5524 ; }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/541#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#541: bootstrap.sh ignores PREFIX environment variable
---------------------------------+------------------------------------------
Reporter: nr | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.6.0.1
Severity: major | Resolution: fixed
Keywords: | Difficulty: unknown
Ghcversion: | Platform: Linux
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
Thanks. It turns out this has been fixed in the dev version already:
{{{
Sun Mar 15 12:54:07 GMT 2009 Duncan Coutts

#541: bootstrap.sh ignores PREFIX environment variable ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: major | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: Linux ---------------------------------+------------------------------------------ Comment (by nr): I had a partial config file because I created one, since I was encouraged to by the output from some command or other. I'm sympathetic to the problem of one install per system vs one config file per user. In that case I hope the Right Thing to do is that every time cabal (cabal-install) runs, it checks to see if ~/.cabal/config exists and if not, creates it. Unless that operation fails (with a suitable error messages), all other references to the file with then make sense. Even running {{{ cabal -h }}} should create the file. A cabal-config man page in section 5 would be a bonus. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/541#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage