[Hackage] #428: cabal update uses too much bandwidth

Hackage trac at galois.com
Tue Jan 27 15:35:23 EST 2009

#428: cabal update uses too much bandwidth
  Reporter:  claus               |        Owner:                   
      Type:  defect              |       Status:  new              
  Priority:  normal              |    Milestone:  cabal-install-0.8
 Component:  cabal-install tool  |      Version:          
  Severity:  normal              |   Resolution:                   
  Keywords:                      |   Difficulty:  hard (< 1 day)   
Ghcversion:  6.8.3               |     Platform:                   
Comment (by igloo):

 FWIW, what Debian/apt does is, when making a new package list:
  * Run `diff -e` (Output an ed script) between the last package list and
 the new one
  * Add a line with the hash of the last package list, and the script
 filename to the index
  * Garbage collect old lines from the index as appropriate (e.g. leave at
 most n lines in the remove entries more than d days old, etc. In Debian
 it's easier as the package list is updated exactly once a day), along with
 the scripts that those lines point to.

 Then to update the index you:
  * Download the index
  * If the hash of your package list is in the index, download and apply
 all scripts since then
  * Otherwise, download the whole new package list

 Example index is
 with scripts in the

 To do this for hackage, cabal-install would need to be able to apply ed
 scripts itself - or at least, enough of it that it can apply scripts that
 `diff -e` makes.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/428#comment:5>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list