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

Fix #133 indexRelFile is function of cabalCacheLayout #134

Merged
merged 1 commit into from
Mar 23, 2024
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
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for pantry

## v0.9.3.3

* Name of tar file of local cache of package index is not hard coded.

## v0.9.3.2

* Support `ansi-terminal-1.0.2`.
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pantry
version: 0.9.3.2
version: 0.9.3.3
synopsis: Content addressable Haskell package management
description: Please see the README on GitHub at <https://github.com/commercialhaskell/pantry#readme>
category: Development
Expand Down
2 changes: 1 addition & 1 deletion pantry.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/Pantry/Hackage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ hackageRelDir = either impureThrow id $ parseRelDir "hackage"
hackageDirL :: HasPantryConfig env => SimpleGetter env (Path Abs Dir)
hackageDirL = pantryConfigL.to ((</> hackageRelDir) . pcRootDir)

-- | The name of the tar file that is part of the local cache of the package
-- index is determined by this package's use of 'HS.cabalCacheLayout' as the
-- layout of the local cache.
indexRelFile :: Path Rel File
indexRelFile = either impureThrow id $ parseRelFile "00-index.tar"
indexRelFile = either impureThrow id $ parseRelFile indexTar
where
indexTar' = HS.cacheLayoutIndexTar HS.cabalCacheLayout
indexTar = HS.toUnrootedFilePath $ HS.unrootPath indexTar'

-- | Where does pantry download its 01-index.tar file from Hackage?
--
Expand Down