fake-package + --package-db=relative/path fails
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
fake-package + --package-db=relative/path fails
**To Reproduce**
```
$ cabal v2-repl -b some-package-in-db --package-db=relative/path/to/db
Resolving dependencies...
Build profile: -w ghc-9.0.2 -O1
In order, the following will be built (use -v for more details):
- fake-package-0 (lib) (first run)
Warning: this is a debug build of cabal-install with assertions enabled.
Configuring library for fake-package-0..
Error: cabal: The following package dependencies were requested
--dependency='some-package-in-db=some-package-in-db-0.1.0.0'
however the given installed package instance does not exist.
```
**Expected behavior**
Should not fail. I suspect the path gets interpreted relatively to the fake-package temporary directory. It should be made absolute before using it that way.
**System information**
- NixOS 22.05
- ghc 9.0.2, cabal 8.9-something
**Additional context**
cc @patrickdoc (#7676)
Related to #6977
Contributor guide
Research direction
Start by reproducing the `cabal v2-repl -b some-package-in-db --package-db=relative/path/to/db` command and tracing how fake-package creates its temporary directory and passes the package database path. Check the related context in #7676 and #6977. Done means the same relative package-db invocation resolves the installed dependency and no longer fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100