[Hackage] #192: unlink files before copying over them

Hackage trac at galois.com
Mon Dec 17 10:15:40 EST 2007


#192: unlink files before copying over them
---------------------+------------------------------------------------------
  Reporter:  duncan  |        Owner:         
      Type:  defect  |       Status:  new    
  Priority:  normal  |    Milestone:         
 Component:  Cabal   |      Version:  1.2.3.0
  Severity:  normal  |     Keywords:         
Difficulty:  normal  |   Ghcversion:  6.8.1  
  Platform:  Linux   |  
---------------------+------------------------------------------------------
 From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336417

 {{{
 It would be nice if cabal would unlink destination files before
 installing over them, rather than just calling "copyFile". It appears
 that when "copyFile" finds that a destination file already exists,
 rather than removing it, it tries to open and truncate it, which leads
 cabal to fail with the following error message when a new version of a
 running program is installed:

 *** Exception: bar: copyFile: resource busy (Text file busy)

 The commonly-used 'install' command does not suffer from this bug.
 }}}

 So I think we need to make a portable installFile function that does the
 right thing on Unix and Windows. At the same time we should think about
 permissions and bug #93.

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


More information about the cabal-devel mailing list