summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/UUID.hs4
-rw-r--r--CHANGELOG3
-rw-r--r--git-annex.cabal3
3 files changed, 7 insertions, 3 deletions
diff --git a/Annex/UUID.hs b/Annex/UUID.hs
index 1e80d6fe1..0e87cda59 100644
--- a/Annex/UUID.hs
+++ b/Annex/UUID.hs
@@ -35,8 +35,8 @@ import qualified Git.Config
import Config
import qualified Data.UUID as U
+import qualified Data.UUID.V4 as U4
import qualified Data.UUID.V5 as U5
-import System.Random
import Data.Bits.Utils
configkey :: ConfigKey
@@ -44,7 +44,7 @@ configkey = annexConfig "uuid"
{- Generates a random UUID, that does not include the MAC address. -}
genUUID :: IO UUID
-genUUID = UUID . show <$> (randomIO :: IO U.UUID)
+genUUID = UUID . show <$> U4.nextRandom
{- Generates a UUID from a given string, using a namespace.
- Given the same namespace, the same string will always result
diff --git a/CHANGELOG b/CHANGELOG
index 27069ebe9..ca2a417ea 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,9 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
* git-annex.cabal: Temporarily limit to persistent <2.5
since esqueleto 2.4.3 is not compatible with the newer version.
* Removed dependency on json library; all JSON is now handled by aeson.
+ * When built with uuid-1.3.12, generate more random UUIDs than before.
+ (However, this did not impact git-annex much, so a hard depedency has
+ not been added on uuid-1.3.12.)
-- Joey Hess <id@joeyh.name> Wed, 20 Jul 2016 12:03:15 -0400
diff --git a/git-annex.cabal b/git-annex.cabal
index 9e2adbc8f..36586a438 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -328,7 +328,8 @@ Executable git-annex
QuickCheck (>= 2.1),
stm (>= 2.3),
mtl (>= 2),
- process, data-default, case-insensitive, uuid, random, dlist,
+ uuid (>= 1.2.6),
+ process, data-default, case-insensitive, random, dlist,
unix-compat, SafeSemaphore, async, directory, filepath, IfElse,
MissingH, hslogger, monad-logger,
utf8-string, bytestring, text, sandi,