[Hackage] #934: cabal seems to require access to user HOME directory

Hackage cvs-ghc at haskell.org
Thu Mar 15 13:46:21 CET 2012


#934: cabal seems to require access to user HOME directory
---------------------------------+------------------------------------------
  Reporter:  kosmikus            |        Owner:                    
      Type:  defect              |       Status:  new               
  Priority:  normal              |    Milestone:  cabal-install-0.16
 Component:  cabal-install tool  |      Version:  1.10.2.0          
  Severity:  normal              |     Keywords:                    
Difficulty:  unknown             |   Ghcversion:                    
  Platform:                      |  
---------------------------------+------------------------------------------
 Jason Dusek reports:


 I am trying to do an automated install of Cabal packages, on EC2
 using Ubuntu's cloud-config. The error above was caught in my
 logs.

 Cloud-config sets up a minimal environment prior to running any
 tasks. All the package managers I've worked with so far -- gem,
 npm, apt -- have no problem with this. It would be nice to find
 a way to turn off Cabal's user-centric behaviour.

 Duncan says:


 You may need to hack the code I'm afraid. It gets the home dir as part
 of reading the configuration file. Look for where it uses
 getAppUserDataDirectory. In particular it's used indirectly in
 baseSavedConfig, though it should mostly get overridden if the config
 file is found. So additionally you'd need to specify a cabal config
 file on the command line to avoid it looking for ~/.cabal/config

 Let us know how it goes, we can integrate changes you make.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/934>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list