Delay between hackage upload and cabal-install seeing package

Duncan Coutts duncan.coutts at
Thu May 14 08:49:31 EDT 2009

On Thu, 2009-05-14 at 12:09 +0100, Malcolm Wallace wrote:
> On Thu, May 14, 2009 at 10:52:36AM +0100, Alistair Bayley wrote:
> > > I've uploaded Takusen-0.8.5 to hackage...
> > > but "cabal install Takusen" still tries to get 0.8.4. Is there a
> > > separate database/file for cabal install ...
> Yes, and it is stored locally on your machine.  You must do
>     cabal update
> to refresh your local machine cache.
> Personally, I would prefer "cabal install" to automatically refresh its
> own local cache (when appropriate), without this extra step.  If cabal
> is going to reach out over the net to download package sources, it might
> as well ensure that it collects the latest version of the index first.

I accept that the current behaviour is not perfect but I don't see an
obvious perfect solution.

The difficulty with this is that we use cabal install for thing we
expect to be local. We don't know that we will need to go to the network
until we've planned what to do, and that involves having the info

We also support offline operations, we have cabal fetch for just this

I added a check for the package db being very old, and we could make the
error message you get when a package is not found mention that you might
want to update.

The other thing is that sometimes you don't want the package database to
be silently updated. You want to stick with a particular snapshot. It's
important that network access be fairly clear to users.


More information about the cabal-devel mailing list