1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-22 11:33:34 +03:00

Moved the persistent part of hackage to subdirectory persist

This commit is contained in:
Boris M. Yartsev 2017-06-29 23:58:16 +03:00
parent 7d09f1dfe3
commit 3dba152d43
5 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -18,6 +18,7 @@ cabal-dev
cabal.sandbox.config
cabal.config
stackagefiles
hackagefiles
TAGS
.DS_Store
*~

View File

@ -9,6 +9,7 @@ module Common(URL,
getArchive,
getArchiveClone,
getTar,
getArchivePersistDir,
getTarClone,
parseIntEnd,
parseValEnd,
@ -95,6 +96,9 @@ tar = "01-index.tar"
tarClone :: FilePath
tarClone = "01-index.orig.tar"
getArchivePersistDir :: HackageUpdateInfo -> FilePath
getArchivePersistDir iuh = iuhUpdateDir iuh </> "persist"
getArchive :: HackageUpdateInfo -> FilePath
getArchive iuh = iuhUpdateDir iuh </> archive

View File

@ -72,7 +72,7 @@ buildCommand ui = processCommand
| chk "ltsshowcont" = let lts = parseValEnd command in
SC.showLTSContents (getLTSFile (sui ui) lts)
-- | chk "ltspersist" =
-- SC.updateLT
@ -111,7 +111,7 @@ buildCommand ui = processCommand
snapURL = (iuhSnapshotURL.iuh) ui
trFile = (getTar.iuh) ui
trFileC = (getTarClone.iuh) ui
ud = (iuhUpdateDir.iuh) ui
ud = (getArchivePersistDir.iuh) ui
snapshotsURL = (getSnapshotURL.sui) ui

View File

@ -9,9 +9,8 @@ import qualified Data.Map.Strict as M
import qualified Data.Version as DV
import Common
{-
type StackageName = String
type StackageVersionLTS = M.Map LongSnapshotName DV.Version
data StackagePackage = SP {
@ -20,3 +19,4 @@ data StackagePackage = SP {
} deriving (Eq, Show)
type StackageMap = M.Map StackageName StackagePackage
-}

View File

@ -68,6 +68,8 @@ parseYamlFileThrow body = case Y.decode body of
(Just datum) -> return datum
Nothing -> X.throwIO $ UAE "Could not decode package data yaml"
-- This is the data, that is extracted from the yaml file
instance FromJSON PackageDatum where
parseJSON = withObject "bigfatyaml" $ \o -> do