Skip to content

Commit

Permalink
hadrian: exclude cabal.project.symlink.broken from source archives
Browse files Browse the repository at this point in the history
Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately,
this broke our source distribution as we use use `tar --dereference` to avoid
issues with symlink compatibility on windows, and `tar --dereference` chokes
when it encounters any broken symlinks.

We can't get rid of `--dereference` because symlinks are generally broken on
windows, so the only option is to exclude this file from source archives.

see also haskell/cabal#10442
  • Loading branch information
wz1000 authored and Marge Bot committed Oct 12, 2024
1 parent e3eec54 commit 3e0a1bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hadrian/src/Rules/SourceDist.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ archiveSourceTree prepare fname = do
runBuilderWithCmdOptions
[Cwd $ sourceDistRoot -/- dirName]
(Tar Create)
["chJf", ".." -/- tarName, baseName]
["chJf", ".." -/- tarName] [baseName]
-- See https:/haskell/cabal/issues/10442 for why we exclude this file.
["--exclude=cabal.project.symlink.broken","-chJf", ".." -/- tarName, baseName]
["--exclude=cabal.project.symlink.broken","-chJf", ".." -/- tarName] [baseName]


-- | This creates a symlink to the 'source' at 'target'
Expand Down

0 comments on commit 3e0a1bb

Please sign in to comment.