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

#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

#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 | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.1 | Platform: Linux ---------------------+------------------------------------------------------ Comment (by guest): Is this still a problem now that http://hackage.haskell.org/trac/ghc/ticket/873 and http://hackage.haskell.org/trac/ghc/ticket/1413 are fixed? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/192#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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 | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.1 | Platform: Linux ---------------------+------------------------------------------------------ Comment (by dons): Haven't seen this with xmonad (it was a common complaint) since 1.2.3 or so. I think you can close this. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/192#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#192: unlink files before copying over them ---------------------+------------------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal | Version: 1.2.3.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: normal Ghcversion: 6.8.1 | Platform: Linux ---------------------+------------------------------------------------------ Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Yes, looking at the copyFile code in package directory 1.0 it looks to be ok now. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/192#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage