persistent-sqlite is now a hard build dependency, since v6 repository mode needs it.
This commit is contained in:
parent
d8cb05c4af
commit
87f0708f88
5 changed files with 9 additions and 41 deletions
|
@ -95,11 +95,6 @@ buildFlags = filter (not . null)
|
||||||
#ifdef WITH_TORRENTPARSER
|
#ifdef WITH_TORRENTPARSER
|
||||||
, "TorrentParser"
|
, "TorrentParser"
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
, "Database"
|
|
||||||
#else
|
|
||||||
#warning Building without Database support
|
|
||||||
#endif
|
|
||||||
#ifdef WITH_EKG
|
#ifdef WITH_EKG
|
||||||
, "EKG"
|
, "EKG"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,11 +35,8 @@ import Utility.CopyFile
|
||||||
import Git.FilePath
|
import Git.FilePath
|
||||||
import Utility.PID
|
import Utility.PID
|
||||||
import qualified Database.Keys
|
import qualified Database.Keys
|
||||||
|
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
import qualified Database.Fsck as FsckDb
|
import qualified Database.Fsck as FsckDb
|
||||||
import Types.CleanupActions
|
import Types.CleanupActions
|
||||||
#endif
|
|
||||||
|
|
||||||
import Data.Time.Clock.POSIX
|
import Data.Time.Clock.POSIX
|
||||||
import System.Posix.Types (EpochTime)
|
import System.Posix.Types (EpochTime)
|
||||||
|
@ -481,17 +478,11 @@ runFsck inc file key a = ifM (needFsck inc key)
|
||||||
{- Check if a key needs to be fscked, with support for incremental fscks. -}
|
{- Check if a key needs to be fscked, with support for incremental fscks. -}
|
||||||
needFsck :: Incremental -> Key -> Annex Bool
|
needFsck :: Incremental -> Key -> Annex Bool
|
||||||
needFsck (ScheduleIncremental _ _ i) k = needFsck i k
|
needFsck (ScheduleIncremental _ _ i) k = needFsck i k
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
needFsck (ContIncremental h) key = liftIO $ not <$> FsckDb.inDb h key
|
needFsck (ContIncremental h) key = liftIO $ not <$> FsckDb.inDb h key
|
||||||
#endif
|
|
||||||
needFsck _ _ = return True
|
needFsck _ _ = return True
|
||||||
|
|
||||||
recordFsckTime :: Incremental -> Key -> Annex ()
|
recordFsckTime :: Incremental -> Key -> Annex ()
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
recordFsckTime inc key = withFsckDb inc $ \h -> liftIO $ FsckDb.addDb h key
|
recordFsckTime inc key = withFsckDb inc $ \h -> liftIO $ FsckDb.addDb h key
|
||||||
#else
|
|
||||||
recordFsckTime _ _ = return ()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{- Records the start time of an incremental fsck.
|
{- Records the start time of an incremental fsck.
|
||||||
-
|
-
|
||||||
|
@ -543,14 +534,11 @@ getStartTime u = do
|
||||||
data Incremental
|
data Incremental
|
||||||
= NonIncremental
|
= NonIncremental
|
||||||
| ScheduleIncremental Duration UUID Incremental
|
| ScheduleIncremental Duration UUID Incremental
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
| StartIncremental FsckDb.FsckHandle
|
| StartIncremental FsckDb.FsckHandle
|
||||||
| ContIncremental FsckDb.FsckHandle
|
| ContIncremental FsckDb.FsckHandle
|
||||||
#endif
|
|
||||||
|
|
||||||
prepIncremental :: UUID -> Maybe IncrementalOpt -> Annex Incremental
|
prepIncremental :: UUID -> Maybe IncrementalOpt -> Annex Incremental
|
||||||
prepIncremental _ Nothing = pure NonIncremental
|
prepIncremental _ Nothing = pure NonIncremental
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
prepIncremental u (Just StartIncrementalO) = do
|
prepIncremental u (Just StartIncrementalO) = do
|
||||||
recordStartTime u
|
recordStartTime u
|
||||||
ifM (FsckDb.newPass u)
|
ifM (FsckDb.newPass u)
|
||||||
|
@ -565,9 +553,6 @@ prepIncremental u (Just (ScheduleIncrementalO delta)) = do
|
||||||
Nothing -> StartIncrementalO
|
Nothing -> StartIncrementalO
|
||||||
Just _ -> MoreIncrementalO
|
Just _ -> MoreIncrementalO
|
||||||
return (ScheduleIncremental delta u i)
|
return (ScheduleIncremental delta u i)
|
||||||
#else
|
|
||||||
prepIncremental _ _ = error "This git-annex was not built with database support; incremental fsck not supported"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cleanupIncremental :: Incremental -> Annex ()
|
cleanupIncremental :: Incremental -> Annex ()
|
||||||
cleanupIncremental (ScheduleIncremental delta u i) = do
|
cleanupIncremental (ScheduleIncremental delta u i) = do
|
||||||
|
@ -581,7 +566,6 @@ cleanupIncremental (ScheduleIncremental delta u i) = do
|
||||||
cleanupIncremental i
|
cleanupIncremental i
|
||||||
cleanupIncremental _ = return ()
|
cleanupIncremental _ = return ()
|
||||||
|
|
||||||
#ifdef WITH_DATABASE
|
|
||||||
openFsckDb :: UUID -> Annex FsckDb.FsckHandle
|
openFsckDb :: UUID -> Annex FsckDb.FsckHandle
|
||||||
openFsckDb u = do
|
openFsckDb u = do
|
||||||
h <- FsckDb.openDb u
|
h <- FsckDb.openDb u
|
||||||
|
@ -594,7 +578,6 @@ withFsckDb (ContIncremental h) a = a h
|
||||||
withFsckDb (StartIncremental h) a = a h
|
withFsckDb (StartIncremental h) a = a h
|
||||||
withFsckDb NonIncremental _ = noop
|
withFsckDb NonIncremental _ = noop
|
||||||
withFsckDb (ScheduleIncremental _ _ i) a = withFsckDb i a
|
withFsckDb (ScheduleIncremental _ _ i) a = withFsckDb i a
|
||||||
#endif
|
|
||||||
|
|
||||||
data KeyStatus = KeyLocked | KeyUnlocked | KeyMissing
|
data KeyStatus = KeyLocked | KeyUnlocked | KeyMissing
|
||||||
|
|
||||||
|
|
9
debian/changelog
vendored
9
debian/changelog
vendored
|
@ -1,4 +1,4 @@
|
||||||
git-annex (6.20151225) unstable; urgency=medium
|
git-annex (5.20151219) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
* Added v6 repository mode, but v5 is still the default for now.
|
* Added v6 repository mode, but v5 is still the default for now.
|
||||||
* The upgrade to version 6 is not done fully automatically, because
|
* The upgrade to version 6 is not done fully automatically, because
|
||||||
|
@ -16,11 +16,8 @@ git-annex (6.20151225) unstable; urgency=medium
|
||||||
* add: In v6 mode, adds modified files to the annex.
|
* add: In v6 mode, adds modified files to the annex.
|
||||||
* assistant: In v6 mode, adds files in unlocked mode, so they can
|
* assistant: In v6 mode, adds files in unlocked mode, so they can
|
||||||
continue to be modified.
|
continue to be modified.
|
||||||
|
* persistent-sqlite is now a hard build dependency, since v6 repository
|
||||||
-- Joey Hess <id@joeyh.name> Tue, 08 Dec 2015 11:14:03 -0400
|
mode needs it.
|
||||||
|
|
||||||
git-annex (5.20151219) UNRELEASED; urgency=medium
|
|
||||||
|
|
||||||
* status: On crippled filesystems, was displaying M for all annexed files
|
* status: On crippled filesystems, was displaying M for all annexed files
|
||||||
that were present. Probably caused by a change to what git status
|
that were present. Probably caused by a change to what git status
|
||||||
displays in this situation. Fixed by treating files git thinks are
|
displays in this situation. Fixed by treating files git thinks are
|
||||||
|
|
8
debian/control
vendored
8
debian/control
vendored
|
@ -43,10 +43,10 @@ Build-Depends:
|
||||||
libghc-wai-dev [i386 amd64 armel armhf armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x],
|
libghc-wai-dev [i386 amd64 armel armhf armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x],
|
||||||
libghc-wai-extra-dev [i386 amd64 armel armhf armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x],
|
libghc-wai-extra-dev [i386 amd64 armel armhf armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x],
|
||||||
libghc-dav-dev (>= 1.0) [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x hurd-i386],
|
libghc-dav-dev (>= 1.0) [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x hurd-i386],
|
||||||
libghc-persistent-dev [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x hurd-i386],
|
libghc-persistent-dev
|
||||||
libghc-persistent-template-dev [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x hurd-i386],
|
libghc-persistent-template-dev
|
||||||
libghc-persistent-sqlite-dev [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x hurd-i386],
|
libghc-persistent-sqlite-dev
|
||||||
libghc-esqueleto-dev [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 powerpc ppc64el s390x hurd-i386],
|
libghc-esqueleto-dev,
|
||||||
libghc-securemem-dev,
|
libghc-securemem-dev,
|
||||||
libghc-byteable-dev,
|
libghc-byteable-dev,
|
||||||
libghc-dns-dev,
|
libghc-dns-dev,
|
||||||
|
|
|
@ -104,10 +104,6 @@ Flag network-uri
|
||||||
Description: Get Network.URI from the network-uri package
|
Description: Get Network.URI from the network-uri package
|
||||||
Default: True
|
Default: True
|
||||||
|
|
||||||
Flag Database
|
|
||||||
Description: Enable building with persistent for database use (disable to build on platforms not supporting TH)
|
|
||||||
Default: True
|
|
||||||
|
|
||||||
Flag Cryptonite
|
Flag Cryptonite
|
||||||
Description: Use the cryptonite library, instead of the older cryptohash
|
Description: Use the cryptonite library, instead of the older cryptohash
|
||||||
|
|
||||||
|
@ -128,7 +124,8 @@ Executable git-annex
|
||||||
monad-control, transformers,
|
monad-control, transformers,
|
||||||
bloomfilter, edit-distance,
|
bloomfilter, edit-distance,
|
||||||
resourcet, http-conduit, http-client, http-types,
|
resourcet, http-conduit, http-client, http-types,
|
||||||
time, old-locale
|
time, old-locale,
|
||||||
|
esqueleto, persistent-sqlite, persistent, persistent-template
|
||||||
CC-Options: -Wall
|
CC-Options: -Wall
|
||||||
GHC-Options: -Wall -fno-warn-tabs
|
GHC-Options: -Wall -fno-warn-tabs
|
||||||
Extensions: PackageImports
|
Extensions: PackageImports
|
||||||
|
@ -273,10 +270,6 @@ Executable git-annex
|
||||||
Build-Depends: torrent (>= 10000.0.0)
|
Build-Depends: torrent (>= 10000.0.0)
|
||||||
CPP-Options: -DWITH_TORRENTPARSER
|
CPP-Options: -DWITH_TORRENTPARSER
|
||||||
|
|
||||||
if flag(Database)
|
|
||||||
Build-Depends: esqueleto, persistent-sqlite, persistent, persistent-template
|
|
||||||
CPP-Options: -DWITH_DATABASE
|
|
||||||
|
|
||||||
if flag(ConcurrentOutput)
|
if flag(ConcurrentOutput)
|
||||||
Build-Depends: concurrent-output (>= 1.6)
|
Build-Depends: concurrent-output (>= 1.6)
|
||||||
CPP-Options: -DWITH_CONCURRENTOUTPUT
|
CPP-Options: -DWITH_CONCURRENTOUTPUT
|
||||||
|
|
Loading…
Reference in a new issue