haskell-mafia / mafia

Provides protection against cabal swindling, robbing, injuring or sabotaging people with chopsticks.
http://haskell-mafia.github.io/mafia/
BSD 3-Clause "New" or "Revised" License
135 stars 19 forks source link

Mafia doesn't do enough to clean up a failed installation of a package before trying again #111

Open jacobstanley opened 8 years ago

jacobstanley commented 8 years ago

Just saw this:

Process failed: cabal unpack --destdir=/mnt/boris-service/.ambiata/mafia/packages/1/7.8.4/haskell-src-exts-1.17.1-fbc87035a5ec6567e081217c2bd2bfbdf4e8557f/src haskell-src-exts-1.17.1 (exit code: 1)

Looking on the box it seems as though an install of haskell-src-exts had got part of the way through, but never made it to writing the package.vanilla marker which indicates it is done. Maybe because it was missing happy on the PATH?

This is fine, but it looks as though we're not doing enough to clean up this directory before trying to use it again for the next attempt at installing haskell-src-exts.

jacobstanley commented 8 years ago

A workaround until we fix the core problem is to delete the package's directory from the cache, i.e:

$ rm -rf /mnt/boris-service/.ambiata/mafia/packages/1/7.8.4/haskell-src-exts-1.17.1-fbc87035a5ec6567e081217c2bd2bfbdf4e8557f