Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate where git-annex will lead to pantry error #4615

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions doc/pantry.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,26 @@ extra-deps:
commit: 2f8a8e1b771829f4a8a77c0111352ce45a14c30f
```

#### Limited [git-annex](https://git-annex.branchable.com) support

Pantry does not support [git-annex](https://git-annex.branchable.com). This is
because `git archive` does not handle symbolic links outside the work tree. It
is still possible to use repositories which use git-annex but do not require the
annex files for the package to be built.

To do so, ensure that any files or directories stored by git-annex are marked
[export-ignore](https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-ignore)
in the `.gitattributes` file in the repository. See
[#4579](https://github.com/commercialhaskell/stack/issues/4579) for more
information.

For example, if the directory `fonts/` is controlled by git-annex, use the
following line.

```gitattributes
fonts export-ignore
```

### Archives (HTTP(S) or local filepath)

You can use HTTP and HTTPS URLs and local filepaths referring to
Expand Down
4 changes: 3 additions & 1 deletion subs/pantry/src/Pantry/Archive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ parseArchive rpli archive fp = do
]
Right x -> Right x
case Map.lookup dest files of
Nothing -> Left $ "Symbolic link dest not found from " ++ mePath me ++ " to " ++ relDest ++ ", looking for " ++ dest
Nothing -> Left $ "Symbolic link dest not found from " ++ mePath me ++ " to " ++ relDest ++ ", looking for " ++ dest ++ ".\n"
++ "This may indicate that the source is a git archive which uses git-annex.\n"
++ "See https://github.com/commercialhaskell/stack/issues/4579 for further information."
Just me' ->
case meType me' of
METNormal -> Right $ SimpleEntry dest FTNormal
Expand Down