-
Duncan Coutts authored
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
a1db53cc