[Pkg-haskell-commits] darcs: haskell-debian: Package 3.47

Joachim Breitner mail at joachim-breitner.de
Sun May 9 16:19:01 UTC 2010


Sun May  9 16:18:44 UTC 2010  Joachim Breitner <mail at joachim-breitner.de>
  * Package 3.47
  Ignore-this: 9cb000954b7c5ccd4e3db25b661da04c

    M ./changelog -2 +1
    R ./patches/
    R ./patches/cabal-6.12.patch
    R ./patches/series
    R ./patches/total-Ord-VersionReq.patch

Sun May  9 16:18:44 UTC 2010  Joachim Breitner <mail at joachim-breitner.de>
  * Package 3.47
  Ignore-this: 9cb000954b7c5ccd4e3db25b661da04c
diff -rN -u old-haskell-debian/changelog new-haskell-debian/changelog
--- old-haskell-debian/changelog	2010-05-09 16:19:01.250650613 +0000
+++ new-haskell-debian/changelog	2010-05-09 16:19:01.258651036 +0000
@@ -1,6 +1,5 @@
-haskell-debian (3.40-1) UNRELEASED; urgency=low
+haskell-debian (3.47-1) UNRELEASED; urgency=low
 
   * Initial release. 
-  * Make the Ord VersionReq instance total
 
  -- Joachim Breitner <nomeata at debian.org>  Thu, 01 Jan 1970 00:00:00 +0000
diff -rN -u old-haskell-debian/patches/cabal-6.12.patch new-haskell-debian/patches/cabal-6.12.patch
--- old-haskell-debian/patches/cabal-6.12.patch	2010-05-09 16:19:01.254650824 +0000
+++ new-haskell-debian/patches/cabal-6.12.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,129 +0,0 @@
-Sat Dec 26 16:48:09 CET 2009  David Fox <dsf at seereason.com>
-  * Changes to get a build under the Cabal shipped with ghc 6.12, made without a full understanding of what I was doing
-Index: haskell-debian-3.40/Distribution/Package/Debian/Bundled.hs
-===================================================================
---- haskell-debian-3.40.orig/Distribution/Package/Debian/Bundled.hs	2009-09-15 17:08:39.000000000 +0200
-+++ haskell-debian-3.40/Distribution/Package/Debian/Bundled.hs	2010-05-01 21:30:54.000000000 +0200
-@@ -30,7 +30,7 @@
- import Debian.Control(Control'(Control), fieldValue, parseControlFromFile)
- import Debian.Relation.ByteString()
- import Debian.Relation(Relation(Rel),parseRelations)
--import Distribution.InstalledPackageInfo(InstalledPackageInfo, libraryDirs, package)
-+import Distribution.InstalledPackageInfo(InstalledPackageInfo, libraryDirs, sourcePackageId)
- import Distribution.Simple.Compiler (Compiler(..), CompilerId(..), CompilerFlavor(..), PackageDB(GlobalPackageDB), compilerFlavor)
- import Distribution.Simple.Configure (getInstalledPackages)
- -- import Distribution.Simple.GHC  (getInstalledPackages)
-@@ -81,7 +81,7 @@
-          (Just installedPackages) ->
-              do ghc6Files <- fmap lines $ readFile "/var/lib/dpkg/info/ghc6.list"
-                 let ghcProvides = filter (\package -> any (\dir -> elem dir ghc6Files) (libraryDirs package)) (allPackages installedPackages)
--                return (Just (GHC, compilerVersion, map package ghcProvides))
-+                return (Just (GHC, compilerVersion, map sourcePackageId ghcProvides))
- ghc6BuiltIns _ = return Nothing
- 
- ghc6BuiltIns' :: Compiler -> IO (Maybe (CompilerFlavor, Version, [PackageIdentifier]))
-@@ -127,19 +127,19 @@
-          [base] -> Right base
-          _ -> Left ("When attempt to extract the base name of " ++ name ++ " I found the following matches: " ++ show subs)
-                  
--getInstalledPackageIndex :: Compiler -> IO (Maybe (PackageIndex InstalledPackageInfo))
-+--getInstalledPackageIndex :: Compiler -> IO (Maybe PackageIndex)
- getInstalledPackageIndex compiler =
-     do pc  <- configureAllKnownPrograms normal  defaultProgramConfiguration
--       getInstalledPackages normal compiler GlobalPackageDB pc
-+       getInstalledPackages normal compiler [GlobalPackageDB] pc
- 
--installedVersions :: String -> PackageIndex InstalledPackageInfo -> Either String [PackageIdentifier]
-+installedVersions :: String -> PackageIndex -> Either String [PackageIdentifier]
- installedVersions name packageIndex = 
-     case searchByName packageIndex name of
-       None -> Left $ "The package " ++ name ++ " does not seem to be installed."
-       Unambiguous pkgs -> 
--          case sortBy (compare `on` (pkgVersion . package)) pkgs of
-+          case sortBy (compare `on` (pkgVersion . sourcePackageId)) pkgs of
-             [] -> Left $ "Odd. searchByName returned an empty Unambiguous match for " ++ name
--            ps -> Right (map package ps)
-+            ps -> Right (map sourcePackageId ps)
-                                    
- v :: String -> [Int] -> PackageIdentifier
- v n x = PackageIdentifier (PackageName n) (Version x [])
-Index: haskell-debian-3.40/Distribution/Package/Debian.hs
-===================================================================
---- haskell-debian-3.40.orig/Distribution/Package/Debian.hs	2009-09-15 17:08:39.000000000 +0200
-+++ haskell-debian-3.40/Distribution/Package/Debian.hs	2010-05-01 21:30:54.000000000 +0200
-@@ -44,13 +44,13 @@
- import Distribution.Text (display)
- import Distribution.Simple.Compiler (CompilerFlavor(..), compilerFlavor, Compiler(..))
- --import Distribution.Simple.Configure (localBuildInfoFile)
--import Distribution.System (buildOS, buildArch)
-+import Distribution.System (Platform(..), buildOS, buildArch)
- import Distribution.License (License(..))
- import Distribution.Package (Package(..), PackageIdentifier(..), PackageName(..), Dependency(..))
- import Distribution.Simple.Program (defaultProgramConfiguration)
- import Distribution.Simple.Configure (configCompiler, maybeGetPersistBuildConfig)
- import Distribution.Simple.InstallDirs (InstallDirs(..), InstallDirTemplates, toPathTemplate)
--import Distribution.Simple.Register (writeInstalledConfig)
-+--import Distribution.Simple.Register (writeInstalledConfig)
- --import Distribution.Simple.Setup (defaultRegisterFlags)
- import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
- import Distribution.Simple.PackageIndex (PackageIndex,fromList)
-@@ -99,7 +99,8 @@
- 
- trim = dropWhile isSpace
- 
---- installedPackages :: Package pkg => IO [PackageIndex pkg]
-+--installedPackages :: Package pkg => IO [PackageIndex]
-+{-
- installedPackages =
-     do (out, err, code) <- lazyCommand cmd L.empty >>=  return . collectOutputUnpacked
-        case code of
-@@ -107,6 +108,7 @@
-          result -> error $ "Failure: " ++ cmd ++ " -> " ++ show result ++ " (" ++ err ++ ")"
-     where
-       cmd = "ghc-pkg list --simple-output"
-+-}
- 
- simplePackageDescription :: GenericPackageDescription -> Flags
-                          -> IO (Compiler, PackageDescription)
-@@ -114,10 +116,11 @@
-     (compiler, _) <- configCompiler (Just (rpmCompiler flags)) Nothing Nothing
-                      defaultProgramConfiguration
-                      (rpmVerbosity flags)
--    installed <- installedPackages
-+    --installed <- installedPackages
-     case finalizePackageDescription (rpmConfigurationsFlags flags)
--          (Nothing :: Maybe (PackageIndex PackageIdentifier))
--          buildOS buildArch (compilerId compiler) [] genPkgDesc of
-+          (const True) (Platform buildArch buildOS) (compilerId compiler)
-+          {- (Nothing :: Maybe PackageIndex) -}
-+          [] genPkgDesc of
-       Left e -> die $ "finalize failed: " ++ show e
-       Right (pd, _) -> return (compiler, pd)
-     
-@@ -159,6 +162,7 @@
-               ExitSuccess -> return ()
-               ExitFailure n -> die ("autoreconf failed with status " ++ show n)
- 
-+{-
- localBuildInfo :: PackageDescription -> Flags -> IO LocalBuildInfo
- localBuildInfo pkgDesc flags =
-   maybeGetPersistBuildConfig defaultDistPref >>=
-@@ -174,6 +178,7 @@
-           if isNothing (library pkgDesc)
-           then error "cabal-debian - Unsupported: package without a library section"
-           else writeInstalledConfig defaultDistPref pkgDesc lbi False Nothing >> return lbi
-+-}
- 
- data PackageInfo = PackageInfo { libDir :: FilePath
-                                , cabalName :: String
-@@ -761,8 +766,8 @@
- -- taken from TagsCheck.py in the rpmlint distribution.
- 
- showLicense :: License -> String
--showLicense GPL = "GPL"
--showLicense LGPL = "LGPL"
-+showLicense (GPL _) = "GPL"
-+showLicense (LGPL _) = "LGPL"
- showLicense BSD3 = "BSD"
- showLicense BSD4 = "BSD-like"
- showLicense PublicDomain = "Public Domain"
diff -rN -u old-haskell-debian/patches/series new-haskell-debian/patches/series
--- old-haskell-debian/patches/series	2010-05-09 16:19:01.250650613 +0000
+++ new-haskell-debian/patches/series	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-cabal-6.12.patch
-total-Ord-VersionReq.patch
diff -rN -u old-haskell-debian/patches/total-Ord-VersionReq.patch new-haskell-debian/patches/total-Ord-VersionReq.patch
--- old-haskell-debian/patches/total-Ord-VersionReq.patch	2010-05-09 16:19:01.250650613 +0000
+++ new-haskell-debian/patches/total-Ord-VersionReq.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,37 +0,0 @@
-Index: haskell-debian-3.40/Debian/Relation/Common.hs
-===================================================================
---- haskell-debian-3.40.orig/Debian/Relation/Common.hs	2010-05-03 14:39:26.000000000 +0200
-+++ haskell-debian-3.40/Debian/Relation/Common.hs	2010-05-03 14:47:46.000000000 +0200
-@@ -4,6 +4,7 @@
- 
- import Data.List
- import Text.ParserCombinators.Parsec
-+import Data.Function
- 
- -- Local Modules
- 
-@@ -63,16 +64,15 @@
-     show (GRE v) = " (>= " ++ show v ++ ")"
-     show (SGR v) = " (>> " ++ show v ++ ")"
- 
---- |@FIXME:@ This instance is currently incomplete and only handles the case
---- where two version requirements are equal.
-+-- |The sort order is based on version number first, then on the kind of
-+-- relation, sorting in the order <<, <= , ==, >= , >>
- instance Ord VersionReq where
--    compare r1 r2 =
--	if r1 == r2 
--	   then EQ 
--	   else
--	case (r1, r2) of
--	     (EEQ v1, EEQ v2) -> compare v1 v2
--	     (a,b) -> error $ "Ord VersionReq does not handle (" ++ show a ++", "++ show b++")"
-+    compare = compare `on` extr
-+      where extr (SLT v) = (v,0)
-+            extr (LTE v) = (v,1)
-+            extr (EEQ v) = (v,2)
-+            extr (GRE v) = (v,3)
-+            extr (SGR v) = (v,4)
- 
- 
- -- |Check if a version number satisfies a version requirement.





More information about the Pkg-haskell-commits mailing list