stackage-update 0.1.0.0 → 0.1.0.1
raw patch · 5 files changed
+41/−3 lines, 5 files
Files
- ChangeLog.md +5/−0
- README.md +26/−0
- Stackage/Update.hs +6/−1
- app/stackage-update.hs +3/−1
- stackage-update.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,8 @@+## 0.1.0.1++* README updates+* Nicer --help output [#2](https://github.com/fpco/stackage-update/pull/2)+ ## 0.1.0.0 * Initial release
README.md view
@@ -12,6 +12,14 @@ [all-cabal-files](https://github.com/commercialhaskell/all-cabal-files) repository. +### Advantages++Versus standard `cabal update`, using `stackage-update` gives the following advantages:++* Only downloads the deltas from the last time you updated your index, threby requiring significantly less bandwidth+* Downloads over a secure HTTPS connection instead of an insecure HTTP connection+* Note that the `all-cabal-files` repo is also updated from Hackage over a secure HTTPS connection+ ### Usage Install from Hackage as usual with:@@ -23,6 +31,15 @@ From then on, simply run `stackage-update` instead of `cabal update`. +### Limitations++This currently has no respect for customized remote-repos in your+~/.cabal/config file. It assumes you have a remote-repo named+`hackage.haskell.org` which should be populated from the all-cabal-files repo.+If you have some kind of custom setup, this tool won't work for you. The vast+majority of users tend to not modify their remote-repos, so `stackage-update`+should work for most people most of the time.+ ### Why stackage? You may be wondering why this tool is called `stackage-update`, when in fact@@ -32,3 +49,12 @@ Concretely, that means that if you have stackage-cli installed, stackage-update works as a plugin. However, you can certainly use `stackage-update` on its own without any other tooling or dependencies on the Stackage project.++### Future enhancements++* If desired, add support for GPG signature checking when cloning/pulling from the `all-cabal-files` repository.+* Detect modified remote-repos and warn the user++### Some notes++Data is stored as a git-repository at app-directory retrieved by [getAppUserDataDirectory](http://hackage.haskell.org/package/directory/docs/System-Directory.html#v:getAppUserDataDirectory), so for Unix it is `$HOME/.stackage-update/all-cabal-files`. This is convenient because you can `cd` there and use regular git tools to see what's new.
Stackage/Update.hs view
@@ -42,7 +42,12 @@ repoExists <- doesDirectoryExist acfDir if repoExists then runIn suDir acfDir "git" ["fetch"]- else runIn suDir suDir "git" ["clone", "https://github.com/commercialhaskell/all-cabal-files.git", "-b", "hackage"]+ else runIn suDir suDir "git"+ [ "clone", "https://github.com/commercialhaskell/all-cabal-files.git"+ , "-b", "display" -- avoid checking out a lot of files+ , "--depth", "1"+ , "--no-single-branch"+ ] cabalDir <- getAppUserDataDirectory "cabal" let hackageDir = cabalDir </> "packages" </> "hackage.haskell.org"
app/stackage-update.hs view
@@ -1,10 +1,12 @@ import Stackage.Update import System.Environment (getArgs)+import Data.List ((++)) main :: IO () main = do args <- getArgs case args of- ["--help"] -> putStrLn "Run this command with no arguments to update your package index"+ ["--help"] -> putStrLn $ "Usage: stackage-update \n" +++ "Run this command with no arguments to update your package index." ["--summary"] -> putStrLn "Update your package index incrementally (requires git)" _ -> stackageUpdate defaultStackageUpdateSettings
stackage-update.cabal view
@@ -1,5 +1,5 @@ name: stackage-update-version: 0.1.0.0+version: 0.1.0.1 synopsis: Update your package index incrementally (requires git) homepage: https://github.com/fpco/stackage-update license: MIT