mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-27 14:41:59 +01:00
Pre-fetch packages to catch Hackage downtime early
This commit is contained in:
parent
ffe6392634
commit
7dd7763dab
@ -1,3 +1,7 @@
|
|||||||
|
## 0.3.0.1
|
||||||
|
|
||||||
|
Pre-fetch all packages from Hackage to catch Hackage downtime early.
|
||||||
|
|
||||||
## 0.3.0.0
|
## 0.3.0.0
|
||||||
|
|
||||||
* Return progress URL from uploadBundle
|
* Return progress URL from uploadBundle
|
||||||
|
|||||||
@ -136,6 +136,22 @@ performBuild pb = do
|
|||||||
|
|
||||||
performBuild' :: PerformBuild -> IO [Text]
|
performBuild' :: PerformBuild -> IO [Text]
|
||||||
performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do
|
performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do
|
||||||
|
-- First make sure to fetch all of the dependencies... just in case Hackage
|
||||||
|
-- has an outage. Don't feel like wasting hours of CPU time.
|
||||||
|
pbLog $ encodeUtf8 "Pre-fetching all packages\n"
|
||||||
|
let toDownload = flip map (mapToList $ bpPackages pbPlan)
|
||||||
|
$ \(name, plan) -> unpack $ concat
|
||||||
|
[ display name
|
||||||
|
, "-"
|
||||||
|
, display $ ppVersion plan
|
||||||
|
]
|
||||||
|
withCheckedProcess
|
||||||
|
(proc "cabal"
|
||||||
|
$ "fetch"
|
||||||
|
: "--no-dependencies"
|
||||||
|
: toDownload)
|
||||||
|
$ \ClosedStream Inherited Inherited -> return ()
|
||||||
|
|
||||||
let removeTree' fp = whenM (isDirectory fp) (removeTree fp)
|
let removeTree' fp = whenM (isDirectory fp) (removeTree fp)
|
||||||
mapM_ removeTree' [pbInstallDest, pbLogDir]
|
mapM_ removeTree' [pbInstallDest, pbLogDir]
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: stackage
|
name: stackage
|
||||||
version: 0.3.0.0
|
version: 0.3.0.1
|
||||||
synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage.
|
synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage.
|
||||||
description: Please see <http://www.stackage.org/package/stackage> for a description and documentation.
|
description: Please see <http://www.stackage.org/package/stackage> for a description and documentation.
|
||||||
homepage: https://github.com/fpco/stackage
|
homepage: https://github.com/fpco/stackage
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user