cabal-6

Multiple concurrent builds would sometimes give an error similar to 'ghc-pkg: cannot create: /home/edsko/path/to/main-package/dist-newstyle/packagedb/ghc-7.10.3 already exists' because packagedbs would be made at the same time. The solution is to initialise packagedbs at the start of the build process rather than when needed.

ghc-version: 8.10.7

hasbugs-version: 1.0.0

license: BSD-3

build-framework: stack

Repository
GitHub Artifacts :

Faults @e6917216

[
  {
    "endline": 578,
    "file": "cabal-install/Distribution/Client/ProjectBuilding.hs",
    "function": "rebuildTargets",
    "module": "Distribution.Client.ProjectBuilding",
    "startline": 578
  },
  {
    "endline": 626,
    "file": "cabal-install/Distribution/Client/ProjectPlanning.hs",
    "function": "getPackageDBContents",
    "module": "Distribution.Client.ProjectPlanning",
    "startline": 625
  },
  {
    "endline": 653,
    "file": "cabal-install/Distribution/Client/ProjectPlanning.hs",
    "function": "getPackageDBContents",
    "module": "Distribution.Client.ProjectPlanning",
    "startline": 645
  }
]

Fixes @5adaf585

[
  {
    "endline": 581,
    "file": "cabal-install/Distribution/Client/ProjectBuilding.hs",
    "function": "rebuildTargets",
    "module": "Distribution.Client.ProjectBuilding",
    "startline": 578
  },
  {
    "endline": 599,
    "file": "cabal-install/Distribution/Client/ProjectBuilding.hs",
    "function": "rebuildTargets",
    "module": "Distribution.Client.ProjectBuilding",
    "startline": 599
  },
  {
    "endline": 633,
    "file": "cabal-install/Distribution/Client/ProjectBuilding.hs",
    "function": "rebuildTargets",
    "module": "Distribution.Client.ProjectBuilding",
    "startline": 626
  },
  {
    "endline": 625,
    "file": "cabal-install/Distribution/Client/ProjectPlanning.hs",
    "function": "getPackageDBContents",
    "module": "Distribution.Client.ProjectPlanning",
    "startline": 625
  },
  {
    "endline": 655,
    "file": "cabal-install/Distribution/Client/ProjectPlanning.hs",
    "function": "getPackageDBContents",
    "module": "Distribution.Client.ProjectPlanning",
    "startline": 648
  }
]