Skip to content

Commit

Permalink
Fix #133 indexRelFile is function of cabalCacheLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Mar 23, 2024
1 parent 4f13ecd commit 9427e8e
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 9427e8e

Please sign in to comment.