Ticket #312 (closed enhancement: fixed)

Opened 5 months ago

Last modified 4 months ago

Allow ${arch} var in install paths

Reported by: larsv Assigned to:
Priority: normal Milestone: Cabal-1.4
Component: Cabal library Version: 1.2.3.0
Severity: minor Keywords:
Cc: Difficulty: very easy (<1 hour)
GHC Version: 6.8.2 Platform:

Description

Currently, the path in the home directory which cabal-install puts installed packages in does not contain the architecture in any way.

This makes things bothersome for people who has the same ${HOME} on several different architectures.

The proposed solution in #haskell is to "add ${arch} as a path template".

Change History

07/14/08 11:28:30 changed by duncan

  • difficulty changed from easy (<4 hours) to very easy (<1 hour).
  • summary changed from Multiple architectures under .cabal/ to Allow ${arch} var in install paths.
  • milestone set to Cabal-1.4.

This is just a matter of adding an ArchVar constructor to PathTemplateVariable in the Distribution.Simple.InstallDirs module. Then the Arch should be passed to substituteTemplates along with the CompilerId etc.

This will make it possible for users to use ${arch} in the install dirs like --libdir (or the equivalents in the cabal-install config file). Note that we're not proposing to actually change the default install paths, just to make it easy for users to do this themselves.

07/14/08 12:56:41 changed by igloo

Don't people with shared $HOMEs already have ways to deal with this, e.g. passing --prefix=~/i386 for configure/make programs, with ~/i386/bin in their path? Wouldn't it make most sense for them to do the same for Cabal programs?

And if they are doing something like that, then we won't know whether they want $arch to be i386, i686, x86, or something else.

07/29/08 09:31:22 changed by duncan

  • status changed from new to closed.
  • resolution set to fixed.
Tue Jul 29 16:19:52 BST 2008  Duncan Coutts <duncan@haskell.org>
  * Allow $arch and $os in install paths.
  Fixes ticket #312. For example a user could use:
    cabal configure --libsubdir="$pkgid/$compiler/$arch"
  if they wanted to have packages for multiple architectures
  co-exist in the same filestore area.

Of course, for cabal-install this libsubdir setting could be saved in the cabal config file.

Tue Jul 29 16:56:54 BST 2008  Duncan Coutts <duncan@haskell.org>
  * Document the $os and $arch install path vars