Hello community, here is the log from the commit of package ghc-acid-state for openSUSE:Factory checked in at 2017-03-04 16:38:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-acid-state (Old) and /work/SRC/openSUSE:Factory/.ghc-acid-state.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-acid-state" Sat Mar 4 16:38:04 2017 rev:2 rq:476854 version:0.14.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-acid-state/ghc-acid-state.changes 2017-02-25 00:51:57.863148419 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-acid-state.new/ghc-acid-state.changes 2017-03-04 16:45:42.283658365 +0100 @@ -1,0 +2,5 @@ +Thu Sep 15 06:42:08 UTC 2016 - psimons@suse.com + +- Update to version 0.14.2 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- acid-state-0.14.1.tar.gz New: ---- acid-state-0.14.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-acid-state.spec ++++++ --- /var/tmp/diff_new_pack.z3uUAp/_old 2017-03-04 16:45:42.795585879 +0100 +++ /var/tmp/diff_new_pack.z3uUAp/_new 2017-03-04 16:45:42.799585312 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-acid-state # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,15 +18,14 @@ %global pkg_name acid-state Name: ghc-%{pkg_name} -Version: 0.14.1 +Version: 0.14.2 Release: 0 Summary: Add ACID guarantees to any serializable Haskell data structure License: SUSE-Public-Domain -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-array-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-cereal-devel @@ -42,7 +41,6 @@ BuildRequires: ghc-template-haskell-devel BuildRequires: ghc-unix-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build -# End cabal-rpm deps %description Use regular Haskell data structures as your database and get stronger ACID @@ -62,15 +60,12 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %post devel %ghc_pkg_recache ++++++ acid-state-0.14.1.tar.gz -> acid-state-0.14.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acid-state-0.14.1/CHANGELOG.md new/acid-state-0.14.2/CHANGELOG.md --- old/acid-state-0.14.1/CHANGELOG.md 2016-06-08 02:19:41.000000000 +0200 +++ new/acid-state-0.14.2/CHANGELOG.md 2016-08-22 19:13:15.000000000 +0200 @@ -1,3 +1,8 @@ +0.14.2 +====== + + - createCheckpoint now cuts a new events file (bug #74) + 0.14.1 ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acid-state-0.14.1/acid-state.cabal new/acid-state-0.14.2/acid-state.cabal --- old/acid-state-0.14.1/acid-state.cabal 2016-06-08 02:19:41.000000000 +0200 +++ new/acid-state-0.14.2/acid-state.cabal 2016-08-22 19:13:15.000000000 +0200 @@ -1,5 +1,5 @@ Name: acid-state -Version: 0.14.1 +Version: 0.14.2 Synopsis: Add ACID guarantees to any serializable Haskell data structure. Description: Use regular Haskell data structures as your database and get stronger ACID guarantees than most RDBMS offer. Homepage: http://acid-state.seize.it/ @@ -10,6 +10,7 @@ Category: Database Build-type: Simple Cabal-version: >=1.10 +tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 Extra-source-files: CHANGELOG.md examples/*.hs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acid-state-0.14.1/examples/CheckpointCutsEvent.hs new/acid-state-0.14.2/examples/CheckpointCutsEvent.hs --- old/acid-state-0.14.1/examples/CheckpointCutsEvent.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/acid-state-0.14.2/examples/CheckpointCutsEvent.hs 2016-08-22 19:13:15.000000000 +0200 @@ -0,0 +1,56 @@ +{- +This example is mostly just to test that this bug is fixed: + +https://github.com/acid-state/acid-state/issues/73 + +At the end of a run, the checkpoint file should contain a single +checkpoint and the event file should be empty. The old checkpoints and +events should be in the Archive directory. + +In the Acrhive directory, each checkpoint file should contain one +checkpoint, and each event file should contain 10 events. + +If you comment out the 'createArchive' line below, then the checkpoint +files should contain 10 checkpoints each. + +-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +module Main (main) where + +-- import Control.Concurrent +import Control.Monad.Reader +import Control.Monad.State +import Data.Acid +import Data.SafeCopy +import Data.Typeable +import System.Environment + +------------------------------------------------------ +-- The Haskell structure that we want to encapsulate + +newtype Counter = Counter { unCounter :: Integer } + deriving (Show, Typeable) + +$(deriveSafeCopy 0 'base ''Counter) + +incCounter :: Update Counter Integer +incCounter = + do (Counter c) <- get + let c' = succ c + put (Counter c') + return c' + +$(makeAcidic ''Counter ['incCounter]) + + +main :: IO () +main = + do acid <- openLocalState (Counter 0) + replicateM_ 10 $ do is <- replicateM 10 (update acid IncCounter) + print is + createCheckpoint acid + createArchive acid + closeAcidState acid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acid-state-0.14.1/src/Data/Acid/Local.hs new/acid-state-0.14.2/src/Data/Acid/Local.hs --- old/acid-state-0.14.1/src/Data/Acid/Local.hs 2016-06-08 02:19:41.000000000 +0200 +++ new/acid-state-0.14.2/src/Data/Acid/Local.hs 2016-08-22 19:13:15.000000000 +0200 @@ -179,7 +179,8 @@ -- This call will not return until the operation has succeeded. createLocalCheckpoint :: SafeCopy st => LocalState st -> IO () createLocalCheckpoint acidState - = do mvar <- newEmptyMVar + = do cutFileLog (localEvents acidState) + mvar <- newEmptyMVar withCoreState (localCore acidState) $ \st -> do eventId <- askCurrentEntryId (localEvents acidState) pushAction (localEvents acidState) $