[commit: packages/Cabal] ghc-head: Distribution/Client/Tar.hs: make clearer error message when tar fails to unpack source (3337429)
git at git.haskell.org
git at git.haskell.org
Mon Aug 26 23:28:44 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=33374292da7b6ecaf640b8a93da7946ea57c91fc
>---------------------------------------------------------------
commit 33374292da7b6ecaf640b8a93da7946ea57c91fc
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Mon Jul 22 01:03:31 2013 +0300
Distribution/Client/Tar.hs: make clearer error message when tar fails to unpack source
Patch improves error reporting to give a clue what broke
when unpacking:
$ dist/build/cabal/cabal unpack hackport
Unpacking to hackport-0.3.2/
cabal: File in tar archive is not in the expected directory "hackport-0.3.2"
but got the following hierarchy: [".",".","@LongLink"]
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
>---------------------------------------------------------------
33374292da7b6ecaf640b8a93da7946ea57c91fc
cabal-install/Distribution/Client/Tar.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cabal-install/Distribution/Client/Tar.hs b/cabal-install/Distribution/Client/Tar.hs
index 9dd546f..bb92d17 100644
--- a/cabal-install/Distribution/Client/Tar.hs
+++ b/cabal-install/Distribution/Client/Tar.hs
@@ -527,8 +527,10 @@ checkEntryTarbomb _ entry | nonFilesystemEntry = Nothing
checkEntryTarbomb expectedTopDir entry =
case FilePath.Native.splitDirectories (entryPath entry) of
(topDir:_) | topDir == expectedTopDir -> Nothing
- _ -> Just $ "File in tar archive is not in the expected directory "
+ s -> Just $ "File in tar archive is not in the expected directory "
++ show expectedTopDir
+ ++ " but got the following hierarchy: "
+ ++ show s
--
More information about the ghc-commits
mailing list