Skip to content

Commit

Permalink
Merge pull request #134 from commercialhaskell/fix133
Browse files Browse the repository at this point in the history
Fix #133 indexRelFile is function of cabalCacheLayout
  • Loading branch information
mpilgrem authored Mar 23, 2024
2 parents 4f13ecd + 9427e8e commit 2d98029
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
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

0 comments on commit 2d98029

Please sign in to comment.