symlink-bindir does not play nice with program-suffix
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
(Imported from [Trac #924](http://hackage.haskell.org/trac/hackage/ticket/924), reported by guest on 2012-03-05)
I'd expect symlinks to be created with the program-suffix. Instead what happens is that cabal-install correctly suffixes the installed binary, but attempts to create a symlink to it from an unsuffixed name, which can fail if the unsuffixed name already exists in the symlink-bindir.
~ $ cabal --versionExample:
cabal-install version 0.13.3
using version 1.14.0 of the Cabal library
gruff $ cabal install --program-suffix=-fixed(The symlink already existed in this particular case, because I wanted to install my development program with a suffix to avoid clobbering the known working version.)
...[snip]...
Warning: could not create a symlink in /home/claude/opt/bin for gruff because
the file exists there already but is not managed by cabal. You can create a
symlink for this executable manually if you wish. The executable file has been
installed at /home/claude/.cabal/bin/gruff-fixed
Contributor guide
Research direction
Start by locating cabal-install's handling of --program-suffix and symlink-bindir, then reproduce the reported command with a suffixed executable and an existing unsuffixed symlink. Done means the created symlink uses the program suffix and does not incorrectly target or conflict with the unsuffixed name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100