diff options
author | Duncan Coutts <duncan@well-typed.com> | 2015-02-09 13:46:06 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-02-09 21:07:26 -0600 |
commit | a1db53cc6ea03d80f097c550bae277141b03ac30 (patch) | |
tree | 494961cd3fa846354040561f7d40bbd9672ede90 /compiler/main/PackageConfig.hs | |
parent | de9a836cd920722a4c28dcb464ff2c8d5905acb9 (diff) | |
download | haskell-a1db53cc6ea03d80f097c550bae277141b03ac30.tar.gz |
Add a workaround to allow older cabal-install to use ghc-7.10
Summary:
This should smooth the upgrade process for people and help with testing
the 7.10 RCs. Otherwise people need to first install cabal-install-1.22
before they can use 7.10.
The problem is that older cabal still used file-style package dbs for
the inplace package db when building packages. The workaround is that
both ghc and ghc-pkg will notice when cabal tells them to use a file
style db e.g. "dist/package.conf.inplace" and, so long as that db is
empty (ie content is []) then they'll instead us a dir style db with
the same name but ".d" appended, so in this example that would be
"dist/package.conf.inplace.d". We have to use a separate dir rather
than transparently upgrading because old Cabal really assumes the path
is a file, and if it encounters a dir it will fail.
This seems to be enough for older Cabal to work, and may well be enough
for other scripts that create dbs using "echo [] > package.conf".
Test Plan:
validate and check new and old cabal can sucessfully install things,
including packages that have internal deps (ie using the inplace db)
Reviewers: hvr, tibbe, austin
Reviewed By: tibbe, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D628
Diffstat (limited to 'compiler/main/PackageConfig.hs')
0 files changed, 0 insertions, 0 deletions