[Hackage] #303: cabal clean: Error while removing dist/: dist/setup: removeDirectory: unsatisified constraints (Directory not empty)

Hackage trac at galois.com
Mon Jun 23 07:02:26 EDT 2008


#303: cabal clean: Error while removing dist/: dist/setup: removeDirectory:
unsatisified constraints (Directory not empty)
----------------------------+-----------------------------------------------
  Reporter:  simonmar       |        Owner:         
      Type:  defect         |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  1.4.0.1
  Severity:  normal         |     Keywords:         
Difficulty:  normal         |   Ghcversion:  6.8.3  
  Platform:                 |  
----------------------------+-----------------------------------------------
 cabal clean has a problem on Windows and Unix with NFS that causes it to
 fail when using a custom `Setup.hs`.  The problem is that we compile
 `Setup.hs` to `dist/setup/setup`, and then invoke `dist/setup/setup clean`
 which is supposed to remove the whole of the `dist` tree, including the
 running binary.  This causes problems on Windows where running binaries
 can't be deleted, and also on NFS where deleting the running binary leaves
 a `.nfs` file behind, preventing the parent directory from being deleted.

 {{{
 > cabal clean -v
 Creating dist/setup (and its parents)
 dist/setup/setup clean --verbose=2 --distpref=dist
 cleaning...
 Error while removing dist/: dist/setup: removeDirectory: unsatisified
 constraints (Directory not empty)
 > ls -lr dist
 total 36
 -rw-rw-r-- 1 simonmar GHC 13069 2008-06-23 11:34 setup-config
 drwxrwxr-x 2 simonmar GHC  4096 2008-06-23 11:34 setup/
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:32 build/
 ~/darcs/ghc-paths > ls -lra dist
 total 52
 -rw-rw-r-- 1 simonmar GHC 13069 2008-06-23 11:34 setup-config
 drwxrwxr-x 2 simonmar GHC  4096 2008-06-23 11:34 setup/
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:32 build/
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:32 ../
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:34 ./
 ~/darcs/ghc-paths > ls -lRa dist
 dist:
 total 52
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:34 ./
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:32 ../
 drwxrwxr-x 4 simonmar GHC  4096 2008-06-23 11:32 build/
 drwxrwxr-x 2 simonmar GHC  4096 2008-06-23 11:34 setup/
 -rw-rw-r-- 1 simonmar GHC 13069 2008-06-23 11:34 setup-config

 dist/build:
 total 52
 drwxrwxr-x 4 simonmar GHC 4096 2008-06-23 11:32 ./
 drwxrwxr-x 4 simonmar GHC 4096 2008-06-23 11:34 ../
 drwxrwxr-x 2 simonmar GHC 4096 2008-06-23 11:32 autogen/
 drwxrwxr-x 2 simonmar GHC 4096 2008-06-23 11:32 GHC/
 -rw-rw-r-- 1 simonmar GHC 3657 2008-06-23 11:32 HSghc-paths-0.1.o
 -rw-rw-r-- 1 simonmar GHC 4404 2008-06-23 11:32 libHSghc-paths-0.1.a

 dist/build/autogen:
 total 24
 drwxrwxr-x 2 simonmar GHC 4096 2008-06-23 11:32 ./
 drwxrwxr-x 4 simonmar GHC 4096 2008-06-23 11:32 ../
 -rw------- 1 simonmar GHC  990 2008-06-23 11:32 Paths_ghc_paths.hs

 dist/build/GHC:
 total 32
 drwxrwxr-x 2 simonmar GHC 4096 2008-06-23 11:32 ./
 drwxrwxr-x 4 simonmar GHC 4096 2008-06-23 11:32 ../
 -rw-rw-r-- 1 simonmar GHC  895 2008-06-23 11:32 Paths.hi
 -rw-rw-r-- 1 simonmar GHC 3824 2008-06-23 11:32 Paths.o

 dist/setup:
 total 16
 drwxrwxr-x 2 simonmar GHC 4096 2008-06-23 11:34 ./
 drwxrwxr-x 4 simonmar GHC 4096 2008-06-23 11:34 ../
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/303>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list