Fix cabal-install in the presence of extra-packages
Extra-packages listed in a cabal project are to be fetched from hackage, and will be in memory as 'NamedPackages' rather than resolved to 'SpecificSourcePackage'. On install, we need to make source-dists for all the specific source packages, and fetch other packages from hackage. Since extra-packages are already 'NamedPackages', we simply return them along the sdistize-d specific source packages and the hackage source packages -- they will be correctly fetched from Hackage from install. Previously, cabal install <tgt> on a project with extra-packages would fail because the branch of 'NamedPackage' for 'PackageSpecifier' was simply unimplemented. Fixes #8848 (cherry picked from commit c671f0e9)
Showing
- cabal-install/src/Distribution/Client/CmdInstall.hs 13 additions, 5 deletionscabal-install/src/Distribution/Client/CmdInstall.hs
- cabal-testsuite/PackageTests/Install/T8848/Main.hs 1 addition, 0 deletionscabal-testsuite/PackageTests/Install/T8848/Main.hs
- cabal-testsuite/PackageTests/Install/T8848/cabal.project 2 additions, 0 deletionscabal-testsuite/PackageTests/Install/T8848/cabal.project
- cabal-testsuite/PackageTests/Install/T8848/cabal.test.hs 6 additions, 0 deletionscabal-testsuite/PackageTests/Install/T8848/cabal.test.hs
- cabal-testsuite/PackageTests/Install/T8848/t8848.cabal 8 additions, 0 deletionscabal-testsuite/PackageTests/Install/T8848/t8848.cabal
Loading
Please register or sign in to comment