#3268: implement the Cabal ${pkgroot} spec extension
------------------------------+---------------------------------------------
  Reporter:  duncan           |          Owner:                  
      Type:  feature request  |         Status:  closed          
  Priority:  normal           |      Milestone:  7.2.1           
 Component:  Package system   |        Version:  6.10.2          
Resolution:  fixed            |       Keywords:                  
  Testcase:                   |      Blockedby:                  
Difficulty:  Unknown          |             Os:  Unknown/Multiple
  Blocking:                   |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown     |  
------------------------------+---------------------------------------------
Changes (by duncan):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Done!

 {{{
 commit 40b6bd47cf00f025426746bbd7abdd0eda2a3afd
 Author: Duncan Coutts <[email protected]>
 Date:   Mon May 23 22:10:45 2011 +0100

     Implement ${pkgroot} spec, allows relocatable registered packages

     Historically ghc implemented relocatable packages by allowing
     "$topdir" in the package registration info and having ghc expand
     this with its notion of $topdir. The topdir refers to where ghc
     itself is installed (specifically the libdir).

     The ${pkgroot} spec takes this idea and makes it portable.
     (http://www.haskell.org/pipermail/libraries/2009-May/011772.html)
     Instead of paths relative to where ghc is installed, they can be
     relative to the package database itself. Thus it is no longer a
     ghc-specific idea and can work for package collections other than
     the global package db.

 commit f35a3d247e023b6c1b0abe677549b29398933b50
 Author: Duncan Coutts <[email protected]>
 Date:   Wed May 25 13:06:14 2011 +0100

     Provide the pkgroot value in ghc-pkg dump & describe when necessary

     Tools handling installed packages need to be able to interpret the
     paths which are relative to the ${pkgroot} which means they need to
     know the value of ${pkgroot}. With ghc-pkg this is not always obvious
     since ghc-pkg does not currently have any way machine interface for
     reporting the location of its package dbs (global, user). The solution
     we have arrived at is simply to emit the pkgroot as an extra field
     when it is needed.

     There are two cases:
      * --no-expand-pkgroot: ghc-pkg dump/describe will not expand the
        ${pkgroot} var, so it will appear literally in the output and the
        pkgroot field will be generated so that tools know what value to
        use for the ${pkgroot}.
      * --expand-pkgroot: ghc-pkg dump/describe will expand the ${pkgroot}
        and ${pkgrooturl} vars and will not generate the pkgroot field.

     The defaults are:
      * ghc-pkg dump/describe --no-expand-pkgroot
      * ghc-pkg field --expand-pkgroot
 }}}

 Also implemented in Cabal:
 {{{
 Wed May 25 12:47:42 BST 2011  Duncan Coutts <[email protected]>
   * Support ${pkgroot}-relative paths in installed package info from hc-
 pkg
   See http://hackage.haskell.org/trac/ghc/ticket/3268
   In new versions of ghc-pkg, ghc-pkg dump will emit an extra field like
   pkgroot: /the/path/that/is/the/pkgroot
   and other fields may contain ${pkgroot}, e.g.
   library-dirs: ${pkgroot}/blah/
   This allows relocatable packages, with package files installed
   relative to the package database itself.
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3268#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to