[commit: Cabal] master: Put the build client it into the build reports (017fbe9)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:55:49 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/017fbe964358033b93c25fc60087e79b0311a041
>---------------------------------------------------------------
commit 017fbe964358033b93c25fc60087e79b0311a041
Author: Duncan Coutts <duncan at haskell.org>
Date: Tue Jun 10 23:46:54 2008 +0000
Put the build client it into the build reports
>---------------------------------------------------------------
cabal-install/Hackage/Reporting.hs | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Hackage/Reporting.hs b/cabal-install/Hackage/Reporting.hs
index 9b3998c..e6ac138 100644
--- a/cabal-install/Hackage/Reporting.hs
+++ b/cabal-install/Hackage/Reporting.hs
@@ -42,9 +42,10 @@ import Hackage.InstallPlan
( InstallPlan, PlanPackage )
import Hackage.ParseUtils
( showFields, parseBasicStanza )
+import qualified Paths_cabal_install (version)
import Distribution.Package
- ( PackageIdentifier, Package(packageId) )
+ ( PackageIdentifier(PackageIdentifier), Package(packageId) )
import Distribution.PackageDescription
( FlagName(..), FlagAssignment )
--import Distribution.Version
@@ -85,6 +86,9 @@ data BuildReport
-- | The Haskell compiler (and hopefully version) used
compiler :: CompilerId,
+ -- | The uploading client, ie cabal-install-x.y.z
+ client :: PackageIdentifier,
+
-- | Which configurations flags we used
flagAssignment :: FlagAssignment,
@@ -145,6 +149,7 @@ buildReport os' arch' comp (ConfiguredPackage pkg flags deps) result =
os = os',
arch = arch',
compiler = comp,
+ client = cabalInstallID,
flagAssignment = flags,
dependencies = deps,
installOutcome = case result of
@@ -158,6 +163,9 @@ buildReport os' arch' comp (ConfiguredPackage pkg flags deps) result =
docsOutcome = NotTried,
testsOutcome = NotTried
}
+ where
+ cabalInstallID =
+ PackageIdentifier "cabal-install" Paths_cabal_install.version
-- ------------------------------------------------------------
-- * External format
@@ -169,6 +177,7 @@ initialBuildReport = BuildReport {
os = requiredField "os",
arch = requiredField "arch",
compiler = requiredField "compiler",
+ client = requiredField "client",
flagAssignment = [],
dependencies = [],
installOutcome = requiredField "install-outcome",
@@ -216,6 +225,8 @@ fieldDescrs =
arch (\v r -> r { arch = v })
, simpleField "compiler" disp parse
compiler (\v r -> r { compiler = v })
+ , simpleField "client" disp parse
+ client (\v r -> r { client = v })
, listField "flags" dispFlag parseFlag
flagAssignment (\v r -> r { flagAssignment = v })
, listField "dependencies" disp parse
More information about the Cvs-libraries
mailing list