[Hackage] #246: cabal-install's tar unpacking does not cope well
with links
Hackage
trac at galois.com
Thu Feb 21 19:25:51 EST 2008
#246: cabal-install's tar unpacking does not cope well with links
----------------------------------+-----------------------------------------
Reporter: duncan | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.2.3.0
Severity: normal | Keywords:
Difficulty: very easy (<1 hour) | Ghcversion: 6.8.2
Platform: |
----------------------------------+-----------------------------------------
{{{
Extracting
/home/me/.cabal/packages/hackage.haskell.org/pandoc/0.46/pandoc-0.46.tar.gz
to /tmp/TMPpandoc-0.46...
cabal: /tmp/TMPpandoc-0.46/pandoc-0.46/COPYRIGHT: copyFile: does not exist
(No such file or directory)
}}}
If we look at this tarfile we find that the `COPYRIGHT` entry in the tar
file is actually a symbolic link to `debian/copyright`. The tar code in
`cabal-install` is designed to cope with symbolic links. It handles them
by copying the target file. Same goes for hard links. The problem in this
case is that it is trying to copy the other file before it has been
unpacked.
One partial solution would be to accumulate a list of links and then copy
all at the end after the other files have been unpacked. It's only partial
because someone could make a tarball with links pointing to other links.
We can probably just ignore that problem and let it fail in the same way
it does now.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/246>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list