Skip to content
Browse files

Upgrade bundled cabal-install from 0.8.0 to 0.8.2

  • Loading branch information...
1 parent 8f3d97c commit 4b2a1d2831e7b4a7148d9760d4977ea2cc78e324 @kolmodin kolmodin committed
Showing with 98 additions and 134 deletions.
  1. +9 −9 Merge.hs
  2. +0 −43 cabal-install-0.8.0/Distribution/Compat/TempFile.hs
  3. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/BuildReports/Anonymous.hs
  4. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/BuildReports/Storage.hs
  5. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/BuildReports/Types.hs
  6. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/BuildReports/Upload.hs
  7. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Check.hs
  8. +3 −7 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Config.hs
  9. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Configure.hs
  10. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Dependency.hs
  11. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Dependency/Bogus.hs
  12. +4 −4 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Dependency/TopDown.hs
  13. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Dependency/TopDown/Constraints.hs
  14. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Dependency/TopDown/Types.hs
  15. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Dependency/Types.hs
  16. +9 −44 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Fetch.hs
  17. +3 −3 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Haddock.hs
  18. +40 −4 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/HttpUtils.hs
  19. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/IndexUtils.hs
  20. +1 −2 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Init.hs
  21. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Init/Heuristics.hs
  22. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Init/Licenses.hs
  23. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Init/Types.hs
  24. +3 −2 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Install.hs
  25. +3 −2 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/InstallPlan.hs
  26. +2 −0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/InstallSymlink.hs
  27. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/List.hs
  28. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/PackageIndex.hs
  29. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Setup.hs
  30. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/SetupWrapper.hs
  31. +2 −2 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/SrcDist.hs
  32. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Tar.hs
  33. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Types.hs
  34. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Unpack.hs
  35. +3 −2 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Update.hs
  36. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Upload.hs
  37. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Utils.hs
  38. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Client/Win32SelfUpgrade.hs
  39. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/Distribution/Compat/Exception.hs
  40. 0 {cabal-install-0.8.0 → cabal-install-0.8.2}/LICENSE
  41. +1 −1 {cabal-install-0.8.0 → cabal-install-0.8.2}/Paths_cabal_install.hs
  42. +8 −2 {cabal-install-0.8.0 → cabal-install-0.8.2}/cabal-install.cabal
  43. +1 −1 hackport.cabal
View
18 Merge.hs
@@ -79,7 +79,7 @@ import Distribution.Simple.Utils
import Network.URI
import Distribution.Client.IndexUtils ( getAvailablePackages )
-import Distribution.Client.Fetch ( downloadURI )
+import Distribution.Client.HttpUtils ( downloadURI )
import qualified Distribution.Client.PackageIndex as Index
import Distribution.Client.Types
@@ -333,14 +333,14 @@ fetchAndDigest verbosity ebuildDir tarballName tarballURI =
withWorkingDirectory ebuildDir $ do
repo_info <- Host.getInfo
let tarDestination = (Host.distfiles_dir repo_info) </> tarballName
- merr <- downloadURI verbosity tarDestination tarballURI
- case merr of
- Just err -> throwEx (E.DownloadFailed (show tarballURI) (show err))
- Nothing -> do
- notice verbosity $ "Saved to " ++ tarDestination
- notice verbosity "Recalculating digests..."
- _ <- system "repoman manifest"
- return ()
+ downloadURI verbosity tarballURI tarDestination
+ -- Just err -> throwEx (E.DownloadFailed (show tarballURI) (show err))
+ -- TODO: downloadURI will throw a non-hackport exception if the
+ -- download fails
+ notice verbosity $ "Saved to " ++ tarDestination
+ notice verbosity "Recalculating digests..."
+ _ <- system "repoman manifest"
+ return ()
withWorkingDirectory :: FilePath -> IO a -> IO a
withWorkingDirectory newDir action = do
View
43 cabal-install-0.8.0/Distribution/Compat/TempFile.hs
@@ -1,43 +0,0 @@
-{-# LANGUAGE CPP #-}
-{-# OPTIONS_GHC -cpp #-}
-{-# OPTIONS_NHC98 -cpp #-}
-{-# OPTIONS_JHC -fcpp #-}
--- #hide
-module Distribution.Compat.TempFile (
- createTempDirectory,
- ) where
-
-import System.FilePath ((</>))
-#ifdef mingw32_HOST_OS
-import System.Directory (createDirectory)
-#else
-import System.Posix.Directory (createDirectory)
-#endif
-import System.IO.Error (try, isAlreadyExistsError)
-
-#if __NHC__
-import System.Posix.Types (CPid(..))
-foreign import ccall unsafe "getpid" c_getpid :: IO CPid
-#else
-import System.Posix.Internals (c_getpid)
-#endif
-
-createTempDirectory :: FilePath -> String -> IO FilePath
-createTempDirectory dir template = do
- pid <- c_getpid
- findTempName pid
- where
- findTempName x = do
- let dirpath = dir </> template ++ show x
- r <- try $ mkPrivateDir dirpath
- case r of
- Right _ -> return dirpath
- Left e | isAlreadyExistsError e -> findTempName (x+1)
- | otherwise -> ioError e
-
-mkPrivateDir :: String -> IO ()
-#ifdef mingw32_HOST_OS
-mkPrivateDir s = System.Directory.createDirectory s
-#else
-mkPrivateDir s = System.Posix.Directory.createDirectory s 0o700
-#endif
View
2 ...ribution/Client/BuildReports/Anonymous.hs → ...ribution/Client/BuildReports/Anonymous.hs
@@ -27,7 +27,7 @@ module Distribution.Client.BuildReports.Anonymous (
) where
import Distribution.Client.Types
- ( ConfiguredPackage(..), BuildResult )
+ ( ConfiguredPackage(..) )
import qualified Distribution.Client.Types as BR
( BuildResult, BuildFailure(..), BuildSuccess(..)
, DocsResult(..), TestsResult(..) )
View
2 ...stribution/Client/BuildReports/Storage.hs → ...stribution/Client/BuildReports/Storage.hs
@@ -30,7 +30,7 @@ import Distribution.Client.Types
, AvailablePackageSource(..), Repo(..), RemoteRepo(..) )
import qualified Distribution.Client.InstallPlan as InstallPlan
import Distribution.Client.InstallPlan
- ( InstallPlan, PlanPackage )
+ ( InstallPlan )
import Distribution.Simple.InstallDirs
( PathTemplate, fromPathTemplate
View
2 ...Distribution/Client/BuildReports/Types.hs → ...Distribution/Client/BuildReports/Types.hs
@@ -15,7 +15,7 @@ module Distribution.Client.BuildReports.Types (
) where
import qualified Distribution.Text as Text
- ( Text(disp, parse) )
+ ( Text(..) )
import qualified Distribution.Compat.ReadP as Parse
( pfail, munch1 )
View
0 ...istribution/Client/BuildReports/Upload.hs → ...istribution/Client/BuildReports/Upload.hs
File renamed without changes.
View
0 ...nstall-0.8.0/Distribution/Client/Check.hs → ...nstall-0.8.2/Distribution/Client/Check.hs
File renamed without changes.
View
10 ...stall-0.8.0/Distribution/Client/Config.hs → ...stall-0.8.2/Distribution/Client/Config.hs
@@ -62,8 +62,6 @@ import Distribution.Simple.Utils
( notice, warn, lowercase )
import Distribution.Compiler
( CompilerFlavor(..), defaultCompilerFlavor )
-import Distribution.System
- ( OS(Windows), buildOS )
import Distribution.Verbosity
( Verbosity, normal )
@@ -212,11 +210,9 @@ defaultCompiler :: CompilerFlavor
defaultCompiler = fromMaybe GHC defaultCompilerFlavor
defaultUserInstall :: Bool
-defaultUserInstall = case buildOS of
- -- We do global installs by default on Windows
- Windows -> False
- -- and per-user installs by default everywhere else
- _ -> True
+defaultUserInstall = True
+-- We do per-user installs by default on all platforms. We used to default to
+-- global installs on Windows but that no longer works on Windows Vista or 7.
defaultRemoteRepo :: RemoteRepo
defaultRemoteRepo = RemoteRepo name uri
View
0 ...ll-0.8.0/Distribution/Client/Configure.hs → ...ll-0.8.2/Distribution/Client/Configure.hs
File renamed without changes.
View
0 ...l-0.8.0/Distribution/Client/Dependency.hs → ...l-0.8.2/Distribution/Client/Dependency.hs
File renamed without changes.
View
0 ...0/Distribution/Client/Dependency/Bogus.hs → ...2/Distribution/Client/Dependency/Bogus.hs
File renamed without changes.
View
8 ...Distribution/Client/Dependency/TopDown.hs → ...Distribution/Client/Dependency/TopDown.hs
@@ -32,10 +32,12 @@ import qualified Distribution.Client.PackageIndex as PackageIndex
import Distribution.Client.PackageIndex (PackageIndex)
import Distribution.Package
( PackageName(..), PackageIdentifier, Package(packageId), packageVersion, packageName
- , Dependency(Dependency), thisPackageVersion {- , notThisPackageVersion -}
+ , Dependency(Dependency), thisPackageVersion, notThisPackageVersion
, PackageFixedDeps(depends) )
import Distribution.PackageDescription
( PackageDescription(buildDepends) )
+import Distribution.Client.PackageUtils
+ ( externalBuildDepends )
import Distribution.PackageDescription.Configuration
( finalizePackageDescription, flattenPackageDescription )
import Distribution.Version
@@ -301,7 +303,7 @@ configurePackage platform comp available spkg = case spkg of
platform comp [] p of
Left missing -> Left missing
Right (pkg, flags') -> Right $
- SemiConfiguredPackage apkg flags' (buildDepends pkg)
+ SemiConfiguredPackage apkg flags' (externalBuildDepends pkg)
dependencySatisfiable = not . null . PackageIndex.lookupDependency available
@@ -565,7 +567,6 @@ addPackageSelectConstraint pkgid constraints =
dep = TaggedDependency NoInstalledConstraint (thisPackageVersion pkgid)
reason = SelectedOther pkgid
-{-
addPackageExcludeConstraint :: PackageIdentifier -> Constraints
-> Satisfiable Constraints
[PackageIdentifier] ExclusionReason
@@ -575,7 +576,6 @@ addPackageExcludeConstraint pkgid constraints =
dep = TaggedDependency NoInstalledConstraint
(notThisPackageVersion pkgid)
reason = ExcludedByConfigureFail
--}
addPackageDependencyConstraint :: PackageIdentifier -> TaggedDependency -> Constraints
-> Satisfiable Constraints
View
0 .../Client/Dependency/TopDown/Constraints.hs → .../Client/Dependency/TopDown/Constraints.hs
File renamed without changes.
View
0 ...bution/Client/Dependency/TopDown/Types.hs → ...bution/Client/Dependency/TopDown/Types.hs
File renamed without changes.
View
0 ...0/Distribution/Client/Dependency/Types.hs → ...2/Distribution/Client/Dependency/Types.hs
File renamed without changes.
View
53 ...nstall-0.8.0/Distribution/Client/Fetch.hs → ...nstall-0.8.2/Distribution/Client/Fetch.hs
@@ -19,7 +19,6 @@ module Distribution.Client.Fetch (
fetchPackage,
isFetched,
downloadIndex,
- downloadURI
) where
import Distribution.Client.Types
@@ -37,7 +36,8 @@ import Distribution.Client.IndexUtils as IndexUtils
( getAvailablePackages, disambiguateDependencies
, getInstalledPackages )
import qualified Distribution.Client.InstallPlan as InstallPlan
-import Distribution.Client.HttpUtils (getHTTP, isOldHackageURI)
+import Distribution.Client.HttpUtils
+ ( downloadURI, isOldHackageURI )
import Distribution.Package
( PackageIdentifier, packageName, packageVersion, Dependency(..) )
@@ -47,8 +47,7 @@ import Distribution.Simple.Compiler
import Distribution.Simple.Program
( ProgramConfiguration )
import Distribution.Simple.Utils
- ( die, notice, info, debug, setupMessage
- , copyFileVerbose, writeFileAtomic )
+ ( die, notice, info, debug, setupMessage )
import Distribution.System
( buildPlatform )
import Distribution.Text
@@ -57,7 +56,6 @@ import Distribution.Verbosity
( Verbosity )
import qualified Data.Map as Map
-import qualified Data.ByteString.Lazy.Char8 as BS
import Control.Monad
( when, filterM )
import System.Directory
@@ -67,36 +65,8 @@ import System.FilePath
import qualified System.FilePath.Posix as FilePath.Posix
( combine, joinPath )
import Network.URI
- ( URI(uriPath, uriScheme) )
-import Network.HTTP
- ( Response(..) )
-import Network.Stream
- ( ConnError(..) )
-
-
-downloadURI :: Verbosity
- -> FilePath -- ^ Where to put it
- -> URI -- ^ What to download
- -> IO (Maybe ConnError)
-downloadURI verbosity path uri | uriScheme uri == "file:" = do
- copyFileVerbose verbosity (uriPath uri) path
- return Nothing
-downloadURI verbosity path uri = do
- eitherResult <- getHTTP verbosity uri
- case eitherResult of
- Left err -> return (Just err)
- Right rsp
- | rspCode rsp == (2,0,0)
- -> do info verbosity ("Downloaded to " ++ path)
- writeFileAtomic path (BS.unpack $ rspBody rsp)
- --FIXME: check the content-length header matches the body length.
- --TODO: stream the download into the file rather than buffering the whole
- -- thing in memory.
- -- remember the ETag so we can not re-download if nothing changed.
- >> return Nothing
-
- | otherwise
- -> return (Just (ErrorMisc ("Unsucessful HTTP code: " ++ show (rspCode rsp))))
+ ( URI(uriPath) )
+
-- Downloads a package to [config-dir/packages/package-id] and returns the path to the package.
downloadPackage :: Verbosity -> Repo -> PackageIdentifier -> IO String
@@ -109,11 +79,8 @@ downloadPackage verbosity repo@Repo{ repoKind = Left remoteRepo } pkgid = do
path = packageFile repo pkgid
debug verbosity $ "GET " ++ show uri
createDirectoryIfMissing True dir
- status <- downloadURI verbosity path uri
- case status of
- Just err -> die $ "Failed to download '" ++ display pkgid
- ++ "': " ++ show err
- Nothing -> return path
+ downloadURI verbosity uri path
+ return path
-- Downloads an index file to [config-dir/packages/serv-id].
downloadIndex :: Verbosity -> RemoteRepo -> FilePath -> IO FilePath
@@ -124,10 +91,8 @@ downloadIndex verbosity repo cacheDir = do
}
path = cacheDir </> "00-index" <.> "tar.gz"
createDirectoryIfMissing True cacheDir
- mbError <- downloadURI verbosity path uri
- case mbError of
- Just err -> die $ "Failed to download index '" ++ show err ++ "'"
- Nothing -> return path
+ downloadURI verbosity uri path
+ return path
-- |Returns @True@ if the package has already been fetched.
isFetched :: AvailablePackage -> IO Bool
View
6 ...tall-0.8.0/Distribution/Client/Haddock.hs → ...tall-0.8.2/Distribution/Client/Haddock.hs
@@ -16,12 +16,12 @@ module Distribution.Client.Haddock
)
where
-import Data.Maybe (Maybe(..), listToMaybe)
+import Data.Maybe (listToMaybe)
import Data.List (maximumBy)
-import Control.Monad (Monad(return), sequence, guard)
+import Control.Monad (guard)
import System.Directory (createDirectoryIfMissing, doesFileExist,
renameFile)
-import System.FilePath (FilePath, (</>), splitFileName)
+import System.FilePath ((</>), splitFileName)
import Distribution.Package (Package(..))
import Distribution.Simple.Program (haddockProgram, ProgramConfiguration
, rawSystemProgram, requireProgramVersion)
View
44 ...ll-0.8.0/Distribution/Client/HttpUtils.hs → ...ll-0.8.2/Distribution/Client/HttpUtils.hs
@@ -2,20 +2,26 @@
-----------------------------------------------------------------------------
-- | Separate module for HTTP actions, using a proxy server if one exists
-----------------------------------------------------------------------------
-module Distribution.Client.HttpUtils (getHTTP, proxy, isOldHackageURI) where
+module Distribution.Client.HttpUtils (
+ downloadURI,
+ getHTTP,
+ proxy,
+ isOldHackageURI
+ ) where
import Network.HTTP
( Request (..), Response (..), RequestMethod (..)
, Header(..), HeaderName(..) )
import Network.URI
( URI (..), URIAuth (..), parseAbsoluteURI )
-import Network.Stream (Result)
+import Network.Stream
+ ( Result, ConnError(..) )
import Network.Browser
( Proxy (..), Authority (..), browse
, setOutHandler, setErrHandler, setProxy, request)
import Control.Monad
( mplus, join, liftM2 )
-import qualified Data.ByteString.Lazy as ByteString
+import qualified Data.ByteString.Lazy.Char8 as ByteString
import Data.ByteString.Lazy (ByteString)
#ifdef WIN32
import System.Win32.Types
@@ -34,7 +40,9 @@ import System.Environment (getEnvironment)
import qualified Paths_cabal_install (version)
import Distribution.Verbosity (Verbosity)
-import Distribution.Simple.Utils (warn, debug)
+import Distribution.Simple.Utils
+ ( die, info, warn, debug
+ , copyFileVerbose, writeFileAtomic )
import Distribution.Text
( display )
import qualified System.FilePath.Posix as FilePath.Posix
@@ -92,6 +100,7 @@ proxy verbosity = do
warn verbosity $ "ignoring http proxy, trying a direct connection"
return NoProxy
Just p -> return p
+--TODO: print info message when we're using a proxy
-- | We need to be able to parse non-URIs like @\"wwwcache.example.com:80\"@
-- which lack the @\"http://\"@ URI scheme. The problem is that
@@ -152,6 +161,33 @@ getHTTP verbosity uri = do
request req
return (Right resp)
+downloadURI :: Verbosity
+ -> URI -- ^ What to download
+ -> FilePath -- ^ Where to put it
+ -> IO ()
+downloadURI verbosity uri path | uriScheme uri == "file:" =
+ copyFileVerbose verbosity (uriPath uri) path
+downloadURI verbosity uri path = do
+ result <- getHTTP verbosity uri
+ let result' = case result of
+ Left err -> Left err
+ Right rsp -> case rspCode rsp of
+ (2,0,0) -> Right (rspBody rsp)
+ (a,b,c) -> Left err
+ where
+ err = ErrorMisc $ "Unsucessful HTTP code: "
+ ++ concatMap show [a,b,c]
+
+ case result' of
+ Left err -> die $ "Failed to download " ++ show uri ++ " : " ++ show err
+ Right body -> do
+ info verbosity ("Downloaded to " ++ path)
+ writeFileAtomic path (ByteString.unpack body)
+ --FIXME: check the content-length header matches the body length.
+ --TODO: stream the download into the file rather than buffering the whole
+ -- thing in memory.
+ -- remember the ETag so we can not re-download if nothing changed.
+
-- Utility function for legacy support.
isOldHackageURI :: URI -> Bool
isOldHackageURI uri
View
0 ...l-0.8.0/Distribution/Client/IndexUtils.hs → ...l-0.8.2/Distribution/Client/IndexUtils.hs
File renamed without changes.
View
3 ...install-0.8.0/Distribution/Client/Init.hs → ...install-0.8.2/Distribution/Client/Init.hs
@@ -375,8 +375,7 @@ writeSetupFile flags = do
writeFile "Setup.hs" setupFile
where
setupFile = unlines
- [ "#!/usr/bin/env runhaskell"
- , "import Distribution.Simple"
+ [ "import Distribution.Simple"
, "main = defaultMain"
]
View
0 ....0/Distribution/Client/Init/Heuristics.hs → ....2/Distribution/Client/Init/Heuristics.hs
File renamed without changes.
View
0 ....8.0/Distribution/Client/Init/Licenses.hs → ....8.2/Distribution/Client/Init/Licenses.hs
File renamed without changes.
View
0 ...l-0.8.0/Distribution/Client/Init/Types.hs → ...l-0.8.2/Distribution/Client/Init/Types.hs
File renamed without changes.
View
5 ...tall-0.8.0/Distribution/Client/Install.hs → ...tall-0.8.2/Distribution/Client/Install.hs
@@ -101,7 +101,7 @@ import Distribution.Simple.Utils
( defaultPackageDesc, rawSystemExit, comparing )
import Distribution.Simple.InstallDirs as InstallDirs
( PathTemplate, fromPathTemplate, toPathTemplate, substPathTemplate
- , initialPathTemplateEnv, compilerTemplateEnv, installDirsTemplateEnv )
+ , initialPathTemplateEnv, installDirsTemplateEnv )
import Distribution.Package
( PackageName, PackageIdentifier, packageName, packageVersion
, Package(..), PackageFixedDeps(..)
@@ -558,7 +558,8 @@ printBuildFailures plan =
printFailureReason reason = case reason of
DependentFailed pkgid -> " depends on " ++ display pkgid
++ " which failed to install."
- DownloadFailed _ -> " failed while downloading the package."
+ DownloadFailed e -> " failed while downloading the package."
+ ++ " The exception was:\n " ++ show e
UnpackFailed e -> " failed while unpacking the package."
++ " The exception was:\n " ++ show e
ConfigureFailed e -> " failed during the configure step."
View
5 ...-0.8.0/Distribution/Client/InstallPlan.hs → ...-0.8.2/Distribution/Client/InstallPlan.hs
@@ -54,8 +54,9 @@ import Distribution.Version
( Version, withinRange )
import Distribution.PackageDescription
( GenericPackageDescription(genPackageFlags)
- , PackageDescription(buildDepends)
, Flag(flagName), FlagName(..) )
+import Distribution.Client.PackageUtils
+ ( externalBuildDepends )
import Distribution.PackageDescription.Configuration
( finalizePackageDescription )
import Distribution.Client.PackageIndex
@@ -490,5 +491,5 @@ configuredPackageProblems platform comp
platform comp
[]
(packageDescription pkg) of
- Right (resolvedPkg, _) -> buildDepends resolvedPkg
+ Right (resolvedPkg, _) -> externalBuildDepends resolvedPkg
Left _ -> error "configuredPackageInvalidDeps internal error"
View
2 ...8.0/Distribution/Client/InstallSymlink.hs → ...8.2/Distribution/Client/InstallSymlink.hs
@@ -66,6 +66,8 @@ import System.Directory
( canonicalizePath )
import System.FilePath
( (</>), splitPath, joinPath, isAbsolute )
+
+import Prelude hiding (catch, ioError)
import System.IO.Error
( catch, isDoesNotExistError, ioError )
import Control.Exception
View
2 ...install-0.8.0/Distribution/Client/List.hs → ...install-0.8.2/Distribution/Client/List.hs
@@ -175,7 +175,7 @@ showPackageSummaryInfo pkginfo =
| otherwise -> text "[ Unknown ]"
Just pkg -> disp (packageVersion pkg)
, maybeShow (homepage pkginfo) "Homepage:" text
- , text "License: " <+> text (show (license pkginfo))
+ , text "License: " <+> text (display (license pkginfo))
])
$+$ text ""
where
View
0 ...0.8.0/Distribution/Client/PackageIndex.hs → ...0.8.2/Distribution/Client/PackageIndex.hs
File renamed without changes.
View
2 ...nstall-0.8.0/Distribution/Client/Setup.hs → ...nstall-0.8.2/Distribution/Client/Setup.hs
@@ -867,7 +867,7 @@ readRepo = readPToMaybe parseRepo
parseRepo :: Parse.ReadP r RemoteRepo
parseRepo = do
name <- Parse.munch1 (\c -> isAlphaNum c || c `elem` "_-.")
- Parse.char ':'
+ _ <- Parse.char ':'
uriStr <- Parse.munch1 (\c -> isAlphaNum c || c `elem` "+-=._/*()@'$:;&!?~")
uri <- maybe Parse.pfail return (parseAbsoluteURI uriStr)
return $ RemoteRepo {
View
0 ...0.8.0/Distribution/Client/SetupWrapper.hs → ...0.8.2/Distribution/Client/SetupWrapper.hs
File renamed without changes.
View
4 ...tall-0.8.0/Distribution/Client/SrcDist.hs → ...tall-0.8.2/Distribution/Client/SrcDist.hs
@@ -55,10 +55,10 @@ sdist flags = do
| otherwise = pkg
setupMessage verbosity "Building source dist for" (packageId pkg')
- if snapshot
+ _ <- if snapshot
then prepareSnapshotTree verbosity pkg' mb_lbi distPref tmpDir pps
else prepareTree verbosity pkg' mb_lbi distPref tmpDir pps
- targzFile <- createArchive verbosity pkg tmpDir distPref
+ targzFile <- createArchive verbosity pkg' tmpDir distPref
notice verbosity $ "Source tarball created: " ++ targzFile
where
View
0 ...-install-0.8.0/Distribution/Client/Tar.hs → ...-install-0.8.2/Distribution/Client/Tar.hs
File renamed without changes.
View
0 ...nstall-0.8.0/Distribution/Client/Types.hs → ...nstall-0.8.2/Distribution/Client/Types.hs
File renamed without changes.
View
2 ...stall-0.8.0/Distribution/Client/Unpack.hs → ...stall-0.8.2/Distribution/Client/Unpack.hs
@@ -45,7 +45,7 @@ import System.Directory
import Control.Monad
( unless, when )
import Data.Ord (comparing)
-import Data.List(null, maximumBy)
+import Data.List(maximumBy)
import System.FilePath
( (</>), addTrailingPathSeparator )
import qualified Data.Map as Map
View
5 ...stall-0.8.0/Distribution/Client/Update.hs → ...stall-0.8.2/Distribution/Client/Update.hs
@@ -33,7 +33,8 @@ import Distribution.Simple.Utils
import Distribution.Verbosity
( Verbosity )
-import qualified Data.ByteString.Lazy.Char8 as BS
+import qualified Data.ByteString.Lazy as BS
+import qualified Data.ByteString.Lazy.Char8 as BS.Char8
import qualified Codec.Compression.GZip as GZip (decompress)
import qualified Data.Map as Map
import System.FilePath (dropExtension)
@@ -56,7 +57,7 @@ updateRepo verbosity repo = case repoKind repo of
notice verbosity $ "Downloading the latest package list from "
++ remoteRepoName remoteRepo
indexPath <- downloadIndex verbosity remoteRepo (repoLocalDir repo)
- writeFileAtomic (dropExtension indexPath) . BS.unpack
+ writeFileAtomic (dropExtension indexPath) . BS.Char8.unpack
. GZip.decompress
=<< BS.readFile indexPath
View
0 ...stall-0.8.0/Distribution/Client/Upload.hs → ...stall-0.8.2/Distribution/Client/Upload.hs
File renamed without changes.
View
0 ...nstall-0.8.0/Distribution/Client/Utils.hs → ...nstall-0.8.2/Distribution/Client/Utils.hs
File renamed without changes.
View
0 ...0/Distribution/Client/Win32SelfUpgrade.hs → ...2/Distribution/Client/Win32SelfUpgrade.hs
File renamed without changes.
View
0 ...ll-0.8.0/Distribution/Compat/Exception.hs → ...ll-0.8.2/Distribution/Compat/Exception.hs
File renamed without changes.
View
0 cabal-install-0.8.0/LICENSE → cabal-install-0.8.2/LICENSE
File renamed without changes.
View
2 cabal-install-0.8.0/Paths_cabal_install.hs → cabal-install-0.8.2/Paths_cabal_install.hs
@@ -5,4 +5,4 @@ module Paths_cabal_install (
import Data.Version (Version(..))
version :: Version
-version = Version {versionBranch = [0,8,0], versionTags = []}
+version = Version {versionBranch = [0,8,2], versionTags = []}
View
10 cabal-install-0.8.0/cabal-install.cabal → cabal-install-0.8.2/cabal-install.cabal
@@ -1,5 +1,5 @@
Name: cabal-install
-Version: 0.9.0
+Version: 0.8.2
Synopsis: The command-line interface for Cabal and Hackage.
Description:
The \'cabal\' command-line program simplifies the process of managing
@@ -24,11 +24,17 @@ Category: Distribution
Build-type: Simple
Extra-Source-Files: README bash-completion/cabal bootstrap.sh
Cabal-Version: >= 1.6
+Tested-With: GHC==6.6.1, GHC==6.8.2, GHC==6.10.4, GHC==6.12.1
source-repository head
type: darcs
location: http://darcs.haskell.org/cabal-install/
+source-repository this
+ type: darcs
+ location: http://darcs.haskell.org/cabal-branches/cabal-install-0.8/
+ tag: 0.8.2
+
flag old-base
description: Old, monolithic base
default: False
@@ -69,6 +75,7 @@ Executable cabal
Distribution.Client.InstallSymlink
Distribution.Client.List
Distribution.Client.PackageIndex
+ Distribution.Client.PackageUtils
Distribution.Client.Setup
Distribution.Client.SetupWrapper
Distribution.Client.SrcDist
@@ -80,7 +87,6 @@ Executable cabal
Distribution.Client.Utils
Distribution.Client.Win32SelfUpgrade
Distribution.Compat.Exception
- Distribution.Compat.TempFile
Paths_cabal_install
build-depends: base >= 2 && < 5,
View
2 hackport.cabal
@@ -18,7 +18,7 @@ Flag split-base
Executable hackport
Main-Is: Main.hs
- Hs-Source-Dirs: ., cabal-install-0.8.0
+ Hs-Source-Dirs: ., cabal-install-0.8.2
Build-Depends:
base >= 2.0 && < 5,
filepath,

0 comments on commit 4b2a1d2

Please sign in to comment.
Something went wrong with that request. Please try again.