Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- abortTransaction
- addGpgSignatureSummary
- appendGpgSignature
- checkoutAt
- checkoutGc
- checkoutTree
- commitTransaction
- copyConfig
- create
- deleteObject
- getConfig
- getDfd
- getDisableFsync
- getMode
- getParent
- getPath
- getRemoteBooleanOption
- getRemoteListOption
- getRemoteOption
- gpgVerifyData
- hasObject
- importObjectFrom
- importObjectFromWithTrust
- isSystem
- isWritable
- listRefs
- listRefsExt
- listStaticDeltaNames
- loadCommit
- loadFile
- loadObjectStream
- loadVariant
- loadVariantIfExists
- modeFromString
- new
- newDefault
- newForSysrootPath
- open
- prepareTransaction
- prune
- pruneFromReachable
- pruneStaticDeltas
- pull
- pullDefaultConsoleProgressChanged
- pullOneDir
- pullWithOptions
- queryObjectStorageSize
- readCommit
- readCommitDetachedMetadata
- regenerateSummary
- reloadConfig
- remoteAdd
- remoteChange
- remoteDelete
- remoteFetchSummary
- remoteFetchSummaryWithOptions
- remoteGetGpgVerify
- remoteGetGpgVerifySummary
- remoteGetUrl
- remoteGpgImport
- remoteList
- remoteListRefs
- resolveRev
- resolveRevExt
- scanHardlinks
- setCacheDir
- setDisableFsync
- setRefImmediate
- signCommit
- signDelta
- staticDeltaExecuteOffline
- staticDeltaGenerate
- transactionSetRef
- transactionSetRefspec
- verifyCommit
- verifyCommitExt
- verifyCommitForRemote
- verifySummary
- writeArchiveToMtree
- writeCommit
- writeCommitDetachedMetadata
- writeCommitWithTime
- writeConfig
- writeContent
- writeContentAsync
- writeContentFinish
- writeContentTrusted
- writeDfdToMtree
- writeDirectoryToMtree
- writeMetadata
- writeMetadataAsync
- writeMetadataFinish
- writeMetadataStreamTrusted
- writeMetadataTrusted
- writeMtree
- Properties
- Signals
- newtype Repo = Repo (ManagedPtr Repo)
- class GObject o => IsRepo o
- toRepo :: (MonadIO m, IsRepo o) => o -> m Repo
- noRepo :: Maybe Repo
- repoAbortTransaction :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoAddGpgSignatureSummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> [Text] -> Maybe Text -> Maybe b -> m ()
- repoAppendGpgSignature :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Bytes -> Maybe b -> m ()
- repoCheckoutAt :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe RepoCheckoutAtOptions -> Int32 -> Text -> Text -> Maybe b -> m ()
- repoCheckoutGc :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoCheckoutTree :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsRepoFile c, IsFileInfo d, IsCancellable e) => a -> RepoCheckoutMode -> RepoCheckoutOverwriteMode -> b -> c -> d -> Maybe e -> m ()
- repoCommitTransaction :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m RepoTransactionStats
- repoCopyConfig :: (HasCallStack, MonadIO m, IsRepo a) => a -> m KeyFile
- repoCreate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoMode -> Maybe b -> m ()
- repoDeleteObject :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m ()
- repoGetConfig :: (HasCallStack, MonadIO m, IsRepo a) => a -> m KeyFile
- repoGetDfd :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Int32
- repoGetDisableFsync :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Bool
- repoGetMode :: (HasCallStack, MonadIO m, IsRepo a) => a -> m RepoMode
- repoGetParent :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Repo
- repoGetPath :: (HasCallStack, MonadIO m, IsRepo a) => a -> m File
- repoGetRemoteBooleanOption :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> Bool -> m Bool
- repoGetRemoteListOption :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> m [Text]
- repoGetRemoteOption :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> Maybe Text -> m Text
- repoGpgVerifyData :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => a -> Maybe Text -> Bytes -> Bytes -> Maybe b -> Maybe c -> Maybe d -> m GpgVerifyResult
- repoHasObject :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m Bool
- repoImportObjectFrom :: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) => a -> b -> ObjectType -> Text -> Maybe c -> m ()
- repoImportObjectFromWithTrust :: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) => a -> b -> ObjectType -> Text -> Bool -> Maybe c -> m ()
- repoIsSystem :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Bool
- repoIsWritable :: (HasCallStack, MonadIO m, IsRepo a) => a -> m ()
- repoListRefs :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Maybe b -> m (Map Text Text)
- repoListRefsExt :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> RepoListRefsExtFlags -> Maybe b -> m (Map Text Text)
- repoListStaticDeltaNames :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m [Text]
- repoLoadCommit :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m (GVariant, [RepoCommitState])
- repoLoadFile :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (Maybe InputStream, Maybe FileInfo, Maybe GVariant)
- repoLoadObjectStream :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m (InputStream, Word64)
- repoLoadVariant :: (HasCallStack, MonadIO m, IsRepo a) => a -> ObjectType -> Text -> m GVariant
- repoLoadVariantIfExists :: (HasCallStack, MonadIO m, IsRepo a) => a -> ObjectType -> Text -> m GVariant
- repoModeFromString :: (HasCallStack, MonadIO m) => Text -> RepoMode -> m ()
- repoNew :: (HasCallStack, MonadIO m, IsFile a) => a -> m Repo
- repoNewDefault :: (HasCallStack, MonadIO m) => m Repo
- repoNewForSysrootPath :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m Repo
- repoOpen :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoPrepareTransaction :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m Bool
- repoPrune :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoPruneFlags -> Int32 -> Maybe b -> m (Int32, Int32, Word64)
- repoPruneFromReachable :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoPruneOptions -> Maybe b -> m (Int32, Int32, Word64)
- repoPruneStaticDeltas :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Maybe b -> m ()
- repoPull :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> Text -> Maybe [Text] -> [RepoPullFlags] -> Maybe b -> Maybe c -> m ()
- repoPullDefaultConsoleProgressChanged :: (HasCallStack, MonadIO m, IsAsyncProgress a) => a -> Ptr () -> m ()
- repoPullOneDir :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> Text -> Text -> Maybe [Text] -> [RepoPullFlags] -> Maybe b -> Maybe c -> m ()
- repoPullWithOptions :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> Text -> GVariant -> Maybe b -> Maybe c -> m ()
- repoQueryObjectStorageSize :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m Word64
- repoReadCommit :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (File, Text)
- repoReadCommitDetachedMetadata :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m GVariant
- repoRegenerateSummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe GVariant -> Maybe b -> m ()
- repoReloadConfig :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoRemoteAdd :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Maybe GVariant -> Maybe b -> m ()
- repoRemoteChange :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) => a -> Maybe b -> RepoRemoteChange -> Text -> Text -> Maybe GVariant -> Maybe c -> m ()
- repoRemoteDelete :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m ()
- repoRemoteFetchSummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (Bytes, Bytes)
- repoRemoteFetchSummaryWithOptions :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe GVariant -> Maybe b -> m (Bytes, Bytes)
- repoRemoteGetGpgVerify :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m Bool
- repoRemoteGetGpgVerifySummary :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m Bool
- repoRemoteGetUrl :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m Text
- repoRemoteGpgImport :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Text -> Maybe b -> Maybe [Text] -> Word32 -> Maybe c -> m ()
- repoRemoteList :: (HasCallStack, MonadIO m, IsRepo a) => a -> m [Text]
- repoRemoteListRefs :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (Map Text Text)
- repoResolveRev :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bool -> m Text
- repoResolveRevExt :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bool -> RepoResolveRevExtFlags -> m Text
- repoScanHardlinks :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoSetCacheDir :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Int32 -> Text -> Maybe b -> m ()
- repoSetDisableFsync :: (HasCallStack, MonadIO m, IsRepo a) => a -> Bool -> m ()
- repoSetRefImmediate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Text -> Maybe Text -> Maybe b -> m ()
- repoSignCommit :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Maybe Text -> Maybe b -> m ()
- repoSignDelta :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Text -> Text -> Maybe b -> m ()
- repoStaticDeltaExecuteOffline :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) => a -> b -> Bool -> Maybe c -> m ()
- repoStaticDeltaGenerate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> StaticDeltaGenerateOpt -> Text -> Text -> Maybe GVariant -> Maybe GVariant -> Maybe b -> m ()
- repoTransactionSetRef :: (HasCallStack, MonadIO m, IsRepo a) => a -> Maybe Text -> Text -> Maybe Text -> m ()
- repoTransactionSetRefspec :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Maybe Text -> m ()
- repoVerifyCommit :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => a -> Text -> Maybe b -> Maybe c -> Maybe d -> m ()
- repoVerifyCommitExt :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => a -> Text -> Maybe b -> Maybe c -> Maybe d -> m GpgVerifyResult
- repoVerifyCommitForRemote :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Maybe b -> m GpgVerifyResult
- repoVerifySummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Bytes -> Bytes -> Maybe b -> m GpgVerifyResult
- repoWriteArchiveToMtree :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) => a -> b -> c -> Maybe RepoCommitModifier -> Bool -> Maybe d -> m ()
- repoWriteCommit :: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) => a -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe GVariant -> b -> Maybe c -> m Text
- repoWriteCommitDetachedMetadata :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe GVariant -> Maybe b -> m ()
- repoWriteCommitWithTime :: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) => a -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe GVariant -> b -> Word64 -> Maybe c -> m Text
- repoWriteConfig :: (HasCallStack, MonadIO m, IsRepo a) => a -> KeyFile -> m ()
- repoWriteContent :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Maybe Text -> b -> Word64 -> Maybe c -> m ByteString
- repoWriteContentAsync :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Maybe Text -> b -> Word64 -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- repoWriteContentFinish :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) => a -> b -> m Word8
- repoWriteContentTrusted :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Text -> b -> Word64 -> Maybe c -> m ()
- repoWriteDfdToMtree :: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) => a -> Int32 -> Text -> b -> Maybe RepoCommitModifier -> Maybe c -> m ()
- repoWriteDirectoryToMtree :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) => a -> b -> c -> Maybe RepoCommitModifier -> Maybe d -> m ()
- repoWriteMetadata :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Maybe Text -> GVariant -> Maybe b -> m ByteString
- repoWriteMetadataAsync :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Maybe Text -> GVariant -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- repoWriteMetadataFinish :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) => a -> b -> Word8 -> m ()
- repoWriteMetadataStreamTrusted :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> ObjectType -> Text -> b -> Word64 -> Maybe c -> m ()
- repoWriteMetadataTrusted :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> GVariant -> Maybe b -> m ()
- repoWriteMtree :: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) => a -> b -> Maybe c -> m File
- constructRepoPath :: (IsRepo o, IsFile a) => a -> IO (GValueConstruct o)
- getRepoPath :: (MonadIO m, IsRepo o) => o -> m File
- constructRepoRemotesConfigDir :: IsRepo o => Text -> IO (GValueConstruct o)
- getRepoRemotesConfigDir :: (MonadIO m, IsRepo o) => o -> m (Maybe Text)
- constructRepoSysrootPath :: (IsRepo o, IsFile a) => a -> IO (GValueConstruct o)
- getRepoSysrootPath :: (MonadIO m, IsRepo o) => o -> m (Maybe File)
- type C_RepoGpgVerifyResultCallback = Ptr () -> CString -> Ptr GpgVerifyResult -> Ptr () -> IO ()
- type RepoGpgVerifyResultCallback = Text -> GpgVerifyResult -> IO ()
- afterRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> RepoGpgVerifyResultCallback -> m SignalHandlerId
- genClosure_RepoGpgVerifyResult :: RepoGpgVerifyResultCallback -> IO Closure
- mk_RepoGpgVerifyResultCallback :: C_RepoGpgVerifyResultCallback -> IO (FunPtr C_RepoGpgVerifyResultCallback)
- noRepoGpgVerifyResultCallback :: Maybe RepoGpgVerifyResultCallback
- onRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> RepoGpgVerifyResultCallback -> m SignalHandlerId
- wrap_RepoGpgVerifyResultCallback :: RepoGpgVerifyResultCallback -> Ptr () -> CString -> Ptr GpgVerifyResult -> Ptr () -> IO ()
Exported types
Methods
abortTransaction
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a | |
-> Maybe b | |
-> m () | (Can throw |
No description available in the introspection data.
addGpgSignatureSummary
repoAddGpgSignatureSummary Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> [Text] |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Add a GPG signature to a summary file.
appendGpgSignature
repoAppendGpgSignature Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Bytes |
|
-> Maybe b |
|
-> m () | (Can throw |
Append a GPG signature to a commit.
checkoutAt
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe RepoCheckoutAtOptions |
|
-> Int32 |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Similar to repoCheckoutTree
, but uses directory-relative
paths for the destination, uses a new OstreeRepoCheckoutAtOptions
,
and takes a commit checksum and optional subpath pair, rather than
requiring use of GFile
APIs for the caller.
It also replaces repoCheckoutAt
which was not safe to
use with GObject introspection.
Note in addition that unlike repoCheckoutTree
, the
default is not to use the repository-internal uncompressed objects
cache.
checkoutGc
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache.
checkoutTree
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsRepoFile c, IsFileInfo d, IsCancellable e) | |
=> a |
|
-> RepoCheckoutMode |
|
-> RepoCheckoutOverwriteMode |
|
-> b |
|
-> c |
|
-> d |
|
-> Maybe e |
|
-> m () | (Can throw |
Check out source
into destination
, which must live on the
physical filesystem. source
may be any subdirectory of a given
commit. The mode
and overwriteMode
allow control over how the
files are checked out.
commitTransaction
repoCommitTransaction Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m RepoTransactionStats | (Can throw |
Complete the transaction. Any refs set with
repoTransactionSetRef
or
repoTransactionSetRefspec
will be written out.
copyConfig
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a | |
-> m KeyFile | Returns: A newly-allocated copy of the repository config |
No description available in the introspection data.
create
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoMode |
|
-> Maybe b |
|
-> m () | (Can throw |
Create the underlying structure on disk for the repository, and call
repoOpen
on the result, preparing it for use.
Since version 2016.8, this function will succeed on an existing repository, and finish creating any necessary files in a partially created repository. However, this function cannot change the mode of an existing repository, and will silently ignore an attempt to do so.
deleteObject
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Remove the object of type objtype
with checksum sha256
from the repository. An error of type IOErrorEnumNotFound
is thrown if the object does not exist.
getConfig
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a | |
-> m KeyFile | Returns: The repository configuration; do not modify |
No description available in the introspection data.
getDfd
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Int32 | Returns: File descriptor for repository root - owned by |
In some cases it's useful for applications to access the repository
directly; for example, writing content into repo/tmp
ensures it's
on the same filesystem. Another case is detecting the mtime on the
repository (to see whether a ref was written).
getDisableFsync
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Bool | Returns: Whether or not |
For more information see repoSetDisableFsync
.
getMode
repoGetMode :: (HasCallStack, MonadIO m, IsRepo a) => a -> m RepoMode Source #
No description available in the introspection data.
getParent
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Repo | Returns: Parent repository, or |
Before this function can be used, ostree_repo_init()
must have been
called.
getPath
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a | |
-> m File | Returns: Path to repo |
No description available in the introspection data.
getRemoteBooleanOption
repoGetRemoteBooleanOption Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Bool |
|
-> m Bool | (Can throw |
OSTree remotes are represented by keyfile groups, formatted like:
[remote "remotename"]
. This function returns a value named optionName
underneath that group, and returns it as a boolean.
If the option is not set, outValue
will be set to defaultValue
. If an
error is returned, outValue
will be set to False
.
getRemoteListOption
repoGetRemoteListOption Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m [Text] | (Can throw |
OSTree remotes are represented by keyfile groups, formatted like:
[remote "remotename"]
. This function returns a value named optionName
underneath that group, and returns it as a zero terminated array of strings.
If the option is not set, or if an error is returned, outValue
will be set
to Nothing
.
getRemoteOption
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe Text |
|
-> m Text | (Can throw |
OSTree remotes are represented by keyfile groups, formatted like:
[remote "remotename"]
. This function returns a value named optionName
underneath that group, or defaultValue
if the remote exists but not the
option name. If an error is returned, outValue
will be set to Nothing
.
gpgVerifyData
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) | |
=> a |
|
-> Maybe Text |
|
-> Bytes |
|
-> Bytes |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe d |
|
-> m GpgVerifyResult | Returns: an |
Verify signatures
for data
using GPG keys in the keyring for
remoteName
, and return an GpgVerifyResult
.
The remoteName
parameter can be Nothing
. In that case it will do
the verifications using GPG keys in the keyrings of all remotes.
hasObject
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m Bool | (Can throw |
importObjectFrom
:: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> ObjectType |
|
-> Text |
|
-> Maybe c |
|
-> m () | (Can throw |
Copy object named by objtype
and checksum
into self
from the
source repository source
. If both repositories are of the same
type and on the same filesystem, this will simply be a fast Unix
hard link operation.
Otherwise, a copy will be performed.
importObjectFromWithTrust
repoImportObjectFromWithTrust Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> ObjectType |
|
-> Text |
|
-> Bool |
|
-> Maybe c |
|
-> m () | (Can throw |
Copy object named by objtype
and checksum
into self
from the
source repository source
. If both repositories are of the same
type and on the same filesystem, this will simply be a fast Unix
hard link operation.
Otherwise, a copy will be performed.
isSystem
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Bool | Returns: |
No description available in the introspection data.
isWritable
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m () | (Can throw |
Returns whether the repository is writable by the current user.
If the repository is not writable, the error
indicates why.
listRefs
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m (Map Text Text) | (Can throw |
If refspecPrefix
is Nothing
, list all local and remote refspecs,
with their current values in outAllRefs
. Otherwise, only list
refspecs which have refspecPrefix
as a prefix.
listRefsExt
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> RepoListRefsExtFlags |
|
-> Maybe b |
|
-> m (Map Text Text) | (Can throw |
If refspecPrefix
is Nothing
, list all local and remote refspecs,
with their current values in outAllRefs
. Otherwise, only list
refspecs which have refspecPrefix
as a prefix. Differently from
repoListRefs
, the prefix will not be removed from the ref
name.
listStaticDeltaNames
repoListStaticDeltaNames Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m [Text] | (Can throw |
This function synchronously enumerates all static deltas in the
repository, returning its result in outDeltas
.
loadCommit
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m (GVariant, [RepoCommitState]) | (Can throw |
A version of repoLoadVariant
specialized to commits,
capable of returning extended state information. Currently
the only extended state is RepoCommitStateRepoCommitStatePartial
, which
means that only a sub-path of the commit is available.
loadFile
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (Maybe InputStream, Maybe FileInfo, Maybe GVariant) | (Can throw |
Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes.
loadObjectStream
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m (InputStream, Word64) | (Can throw |
Load object as a stream; useful when copying objects between repositories.
loadVariant
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> m GVariant | (Can throw |
Load the metadata object sha256
of type objtype
, storing the
result in outVariant
.
loadVariantIfExists
repoLoadVariantIfExists Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> m GVariant | (Can throw |
Attempt to load the metadata object sha256
of type objtype
if it
exists, storing the result in outVariant
. If it doesn't exist,
Nothing
is returned.
modeFromString
:: (HasCallStack, MonadIO m) | |
=> Text | |
-> RepoMode | |
-> m () | (Can throw |
No description available in the introspection data.
new
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> m Repo | Returns: An accessor object for an OSTree repository located at |
No description available in the introspection data.
newDefault
:: (HasCallStack, MonadIO m) | |
=> m Repo | Returns: An accessor object for an OSTree repository located at /ostree/repo |
If the current working directory appears to be an OSTree
repository, create a new Repo
object for accessing it.
Otherwise use the path in the OSTREE_REPO environment variable
(if defined) or else the default system repository located at
/ostree/repo.
newForSysrootPath
repoNewForSysrootPath Source #
:: (HasCallStack, MonadIO m, IsFile a, IsFile b) | |
=> a |
|
-> b |
|
-> m Repo | Returns: An accessor object for the OSTree repository located at |
Creates a new Repo
instance, taking the system root path explicitly
instead of assuming "/".
open
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a | |
-> Maybe b | |
-> m () | (Can throw |
No description available in the introspection data.
prepareTransaction
repoPrepareTransaction Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m Bool | (Can throw |
Starts or resumes a transaction. In order to write to a repo, you
need to start a transaction. You can complete the transaction with
repoCommitTransaction
, or abort the transaction with
repoAbortTransaction
.
Currently, transactions are not atomic, and aborting a transaction will not erase any data you write during the transaction.
prune
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoPruneFlags |
|
-> Int32 |
|
-> Maybe b |
|
-> m (Int32, Int32, Word64) | (Can throw |
Delete content from the repository. By default, this function will only delete "orphaned" objects not referred to by any commit. This can happen during a local commit operation, when we have written content objects but not saved the commit referencing them.
However, if RepoPruneFlagsRefsOnly
is provided, instead
of traversing all commits, only refs will be used. Particularly
when combined with depth
, this is a convenient way to delete
history from the repository.
Use the RepoPruneFlagsNoPrune
to just determine
statistics on objects that would be deleted, without actually
deleting them.
pruneFromReachable
repoPruneFromReachable Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoPruneOptions |
|
-> Maybe b |
|
-> m (Int32, Int32, Word64) | (Can throw |
Delete content from the repository. This function is the "backend"
half of the higher level repoPrune
. To use this function,
you determine the root set yourself, and this function finds all other
unreferenced objects and deletes them.
Use this API when you want to perform more selective pruning - for example, retain all commits from a production branch, but just GC some history from your dev branch.
The RepoPruneFlagsNoPrune
flag may be specified to just determine
statistics on objects that would be deleted, without actually deleting them.
pruneStaticDeltas
repoPruneStaticDeltas Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Prune static deltas, if COMMIT is specified then delete static delta files only targeting that commit; otherwise any static delta of non existing commits are deleted.
pull
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Maybe [Text] |
|
-> [RepoPullFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
Connect to the remote repository, fetching the specified set of
refs refsToFetch
. For each ref that is changed, download the
commit, all metadata, and all content objects, storing them safely
on disk in self
.
If flags
contains RepoPullFlagsMirror
, and
the refsToFetch
is Nothing
, and the remote repository contains a
summary file, then all refs will be fetched.
If flags
contains RepoPullFlagsCommitOnly
, then only the
metadata for the commits in refsToFetch
is pulled.
Warning: This API will iterate the thread default main context,
which is a bug, but kept for compatibility reasons. If you want to
avoid this, use mainContextPushThreadDefault
to push a new
one around this call.
pullDefaultConsoleProgressChanged
repoPullDefaultConsoleProgressChanged Source #
:: (HasCallStack, MonadIO m, IsAsyncProgress a) | |
=> a |
|
-> Ptr () |
|
-> m () |
Convenient "changed" callback for use with
asyncProgressNewAndConnect
when pulling from a remote
repository.
Depending on the state of the AsyncProgress
, either displays a
custom status message, or else outstanding fetch progress in bytes/sec,
or else outstanding content or metadata writes to the repository in
number of objects.
Compatibility note: this function previously assumed that userData
was a pointer to a GSConsole
instance. This is no longer the case,
and userData
is ignored.
pullOneDir
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe [Text] |
|
-> [RepoPullFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
This is similar to repoPull
, but only fetches a single
subpath.
pullWithOptions
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> GVariant |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
Like repoPull
, but supports an extensible set of flags.
The following are currently defined:
- refs (as): Array of string refs
- collection-refs (a(sss)): Array of (collection ID, ref name, checksum) tuples to pull;
mutually exclusive with
refs
andoverride-commit-ids
. Checksums may be the empty string to pull the latest commit for that ref - flags (i): An instance of
RepoPullFlags
- subdir (s): Pull just this subdirectory
- subdirs (as): Pull just these subdirectories
- override-remote-name (s): If local, add this remote to refspec
- gpg-verify (b): GPG verify commits
- gpg-verify-summary (b): GPG verify summary
- depth (i): How far in the history to traverse; default is 0, -1 means infinite
- disable-static-deltas (b): Do not use static deltas
- require-static-deltas (b): Require static deltas
- override-commit-ids (as): Array of specific commit IDs to fetch for refs
- dry-run (b): Only print information on what will be downloaded (requires static deltas)
- override-url (s): Fetch objects from this URL if remote specifies no metalink in options
- inherit-transaction (b): Don't initiate, finish or abort a transaction, useful to do multiple pulls in one transaction.
- http-headers (a(ss)): Additional headers to add to all HTTP requests
- update-frequency (u): Frequency to call the async progress callback in milliseconds, if any; only values higher than 0 are valid
- localcache-repos (as): File paths for local repos to use as caches when doing remote fetches
queryObjectStorageSize
repoQueryObjectStorageSize Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m Word64 | (Can throw |
Return the size in bytes of object with checksum sha256
, after any
compression has been applied.
readCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (File, Text) | (Can throw |
Load the content for rev
into outRoot
.
readCommitDetachedMetadata
repoReadCommitDetachedMetadata Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m GVariant | (Can throw |
OSTree commits can have arbitrary metadata associated; this
function retrieves them. If none exists, outMetadata
will be set
to Nothing
.
regenerateSummary
repoRegenerateSummary Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
An OSTree repository can contain a high level "summary" file that describes the available branches and other metadata.
If the timetable for making commits and updating the summary file is fairly
regular, setting the ostree.summary.expires
key in additionalMetadata
will aid clients in working out when to check for updates.
It is regenerated automatically after a commit if
core/commit-update-summary
is set.
If the core/collection-id
key is set in the configuration, it will be
included as OSTREE_SUMMARY_COLLECTION_ID
in the summary file. Refs from the
refs/mirrors
directory will be included in the generated summary file,
listed under the OSTREE_SUMMARY_COLLECTION_MAP
key. Collection IDs and refs
in OSTREE_SUMMARY_COLLECTION_MAP
are guaranteed to be in lexicographic
order.
reloadConfig
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
By default, an Repo
will cache the remote configuration and its
own repo/config data. This API can be used to reload it.
remoteAdd
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Create a new remote named name
pointing to url
. If options
is
provided, then it will be mapped to KeyFile
entries, where the
GVariant dictionary key is an option string, and the value is
mapped as follows:
* s: keyFileSetString
* b: keyFileSetBoolean
* as: keyFileSetStringList
remoteChange
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) | |
=> a |
|
-> Maybe b |
|
-> RepoRemoteChange |
|
-> Text |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe c |
|
-> m () | (Can throw |
A combined function handling the equivalent of
repoRemoteAdd
, repoRemoteDelete
, with more
options.
remoteDelete
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Delete the remote named name
. It is an error if the provided
remote does not exist.
remoteFetchSummary
repoRemoteFetchSummary Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (Bytes, Bytes) | (Can throw |
Tries to fetch the summary file and any GPG signatures on the summary file
over HTTP, and returns the binary data in outSummary
and outSignatures
respectively.
If no summary file exists on the remote server, outSummary
is set to
nULL
. Likewise if the summary file is not signed, outSignatures
is
set to nULL
. In either case the function still returns True
.
Parse the summary data into a GVariant
using variantNewFromBytes
with OSTREE_SUMMARY_GVARIANT_FORMAT
as the format string.
remoteFetchSummaryWithOptions
repoRemoteFetchSummaryWithOptions Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m (Bytes, Bytes) | (Can throw |
Like repoRemoteFetchSummary
, but supports an extensible set of flags.
The following are currently defined:
- override-url (s): Fetch summary from this URL if remote specifies no metalink in options
- http-headers (a(ss)): Additional headers to add to all HTTP requests
remoteGetGpgVerify
repoRemoteGetGpgVerify Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m Bool | (Can throw |
Return whether GPG verification is enabled for the remote named name
through outGpgVerify
. It is an error if the provided remote does
not exist.
remoteGetGpgVerifySummary
repoRemoteGetGpgVerifySummary Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m Bool | (Can throw |
Return whether GPG verification of the summary is enabled for the remote
named name
through outGpgVerifySummary
. It is an error if the provided
remote does not exist.
remoteGetUrl
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m Text | (Can throw |
Return the URL of the remote named name
through outUrl
. It is an
error if the provided remote does not exist.
remoteGpgImport
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe [Text] |
|
-> Word32 |
|
-> Maybe c |
|
-> m () | (Can throw |
Imports one or more GPG keys from the open sourceStream
, or from the
user's personal keyring if sourceStream
is Nothing
. The keyIds
array
can optionally restrict which keys are imported. If keyIds
is Nothing
,
then all keys are imported.
The imported keys will be used to conduct GPG verification when pulling
from the remote named name
.
remoteList
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m [Text] | Returns: a |
remoteListRefs
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (Map Text Text) | (Can throw |
No description available in the introspection data.
resolveRev
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m Text | (Can throw |
Look up the given refspec, returning the checksum it references in
the parameter outRev
. Will fall back on remote directory if cannot
find the given refspec in local.
resolveRevExt
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> RepoResolveRevExtFlags |
|
-> m Text | (Can throw |
Look up the given refspec, returning the checksum it references in
the parameter outRev
. Differently from repoResolveRev
,
this will not fall back to searching through remote repos if a
local ref is specified but not found.
scanHardlinks
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
When ostree builds a mutable tree from directory like in
repoWriteDirectoryToMtree
, it has to scan all files that you
pass in and compute their checksums. If your commit contains hardlinks from
ostree's existing repo, ostree can build a mapping of device numbers and
inodes to their checksum.
There is an upfront cost to creating this mapping, as this will scan the
entire objects directory. If your commit is composed of mostly hardlinks to
existing ostree objects, then this will speed up considerably, so call it
before you call ostree_write_directory_to_mtree()
or similar.
setCacheDir
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Set a custom location for the cache directory used for e.g. per-remote summary caches. Setting this manually is useful when doing operations on a system repo as a user because you don't have write permissions in the repo, where the cache is normally stored.
setDisableFsync
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Bool |
|
-> m () |
Disable requests to fsync()
to stable storage during commits. This
option should only be used by build system tools which are creating
disposable virtual machines, or have higher level mechanisms for
ensuring data consistency.
setRefImmediate
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
This is like repoTransactionSetRef
, except it may be
invoked outside of a transaction. This is presently safe for the
case where we're creating or overwriting an existing ref.
signCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Add a GPG signature to a commit.
signDelta
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta.
staticDeltaExecuteOffline
repoStaticDeltaExecuteOffline Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Bool |
|
-> Maybe c |
|
-> m () | (Can throw |
Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. The directory must be named with the form "FROM-TO", where both are checksums, and it must contain a file named "superblock", along with at least one part.
staticDeltaGenerate
repoStaticDeltaGenerate Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> StaticDeltaGenerateOpt |
|
-> Text |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Generate a lookaside "static delta" from from
(Nothing
means
from-empty) which can generate the objects in to
. This delta is
an optimization over fetching individual objects, and can be
conveniently stored and applied offline.
The params
argument should be an a{sv}. The following attributes
are known:
- min-fallback-size: u: Minimum uncompressed size in megabytes to use fallback, 0 to disable fallbacks
- max-chunk-size: u: Maximum size in megabytes of a delta part
- max-bsdiff-size: u: Maximum size in megabytes to consider bsdiff compression
for input files
- compression: y: Compression type: 0=none, x=lzma, g=gzip
- bsdiff-enabled: b: Enable bsdiff compression. Default TRUE.
- inline-parts: b: Put part data in header, to get a single file delta. Default FALSE.
- verbose: b: Print diagnostic messages. Default FALSE.
- endianness: b: Deltas use host byte order by default; this option allows choosing (G_BIG_ENDIAN or G_LITTLE_ENDIAN)
- filename: ay: Save delta superblock to this filename, and parts in the same directory. Default saves to repository.
transactionSetRef
repoTransactionSetRef Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe Text |
|
-> m () |
If checksum
is not Nothing
, then record it as the target of ref named
ref
; if remote
is provided, the ref will appear to originate from that
remote.
Otherwise, if checksum
is Nothing
, then record that the ref should
be deleted.
The change will not be written out immediately, but when the transaction
is completed with repoCommitTransaction
. If the transaction
is instead aborted with repoAbortTransaction
, no changes will
be made to the repository.
transactionSetRefspec
repoTransactionSetRefspec Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> m () |
Like repoTransactionSetRef
, but takes concatenated
refspec
format as input instead of separate remote and name
arguments.
verifyCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe d |
|
-> m () | (Can throw |
Check for a valid GPG signature on commit named by the ASCII
checksum commitChecksum
.
verifyCommitExt
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe d |
|
-> m GpgVerifyResult | Returns: an |
Read GPG signature(s) on the commit named by the ASCII checksum
commitChecksum
and return detailed results.
verifyCommitForRemote
repoVerifyCommitForRemote Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m GpgVerifyResult | Returns: an |
Read GPG signature(s) on the commit named by the ASCII checksum
commitChecksum
and return detailed results, based on the keyring
configured for remote
.
verifySummary
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Bytes |
|
-> Bytes |
|
-> Maybe b |
|
-> m GpgVerifyResult | Returns: an |
Verify signatures
for summary
data using GPG keys in the keyring for
remoteName
, and return an GpgVerifyResult
.
writeArchiveToMtree
repoWriteArchiveToMtree Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) | |
=> a |
|
-> b |
|
-> c |
|
-> Maybe RepoCommitModifier |
|
-> Bool |
|
-> Maybe d |
|
-> m () | (Can throw |
Import an archive file archive
into the repository, and write its
file structure to mtree
.
writeCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe GVariant |
|
-> b |
|
-> Maybe c |
|
-> m Text | (Can throw |
Write a commit metadata object, referencing rootContentsChecksum
and rootMetadataChecksum
.
writeCommitDetachedMetadata
repoWriteCommitDetachedMetadata Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Replace any existing metadata associated with commit referred to by
checksum
with metadata
. If metadata
is Nothing
, then existing
data will be deleted.
writeCommitWithTime
repoWriteCommitWithTime Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe GVariant |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m Text | (Can throw |
Write a commit metadata object, referencing rootContentsChecksum
and rootMetadataChecksum
.
writeConfig
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> KeyFile |
|
-> m () | (Can throw |
Save newConfig
in place of this repository's config file. Note
that newConfig
should not be modified after - this function
simply adds a reference.
writeContent
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m ByteString | (Can throw |
Store the content object streamed as objectInput
,
with total length length
. The actual checksum will
be returned as outCsum
.
writeContentAsync
repoWriteContentAsync Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously store the content object object
. If provided, the
checksum expectedChecksum
will be verified.
writeContentFinish
repoWriteContentFinish Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m Word8 | (Can throw |
Completes an invocation of repoWriteContentAsync
.
writeContentTrusted
repoWriteContentTrusted Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m () | (Can throw |
Store the content object streamed as objectInput
, with total
length length
. The given checksum
will be treated as trusted.
This function should be used when importing file objects from local disk, for example.
writeDfdToMtree
:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> b |
|
-> Maybe RepoCommitModifier |
|
-> Maybe c |
|
-> m () | (Can throw |
Store as objects all contents of the directory referred to by dfd
and path
all children into the repository self
, overlaying the
resulting filesystem hierarchy into mtree
.
writeDirectoryToMtree
repoWriteDirectoryToMtree Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) | |
=> a |
|
-> b |
|
-> c |
|
-> Maybe RepoCommitModifier |
|
-> Maybe d |
|
-> m () | (Can throw |
Store objects for dir
and all children into the repository self
,
overlaying the resulting filesystem hierarchy into mtree
.
writeMetadata
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Maybe Text |
|
-> GVariant |
|
-> Maybe b |
|
-> m ByteString | (Can throw |
Store the metadata object variant
. Return the checksum
as outCsum
.
If expectedChecksum
is not Nothing
, verify it against the
computed checksum.
writeMetadataAsync
repoWriteMetadataAsync Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Maybe Text |
|
-> GVariant |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously store the metadata object variant
. If provided,
the checksum expectedChecksum
will be verified.
writeMetadataFinish
repoWriteMetadataFinish Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) | |
=> a | |
-> b | |
-> Word8 | |
-> m () | (Can throw |
No description available in the introspection data.
writeMetadataStreamTrusted
repoWriteMetadataStreamTrusted Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m () | (Can throw |
Store the metadata object variant
; the provided checksum
is
trusted.
writeMetadataTrusted
repoWriteMetadataTrusted Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Store the metadata object variant
; the provided checksum
is
trusted.
writeMtree
:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m File | (Can throw |
Write all metadata objects for mtree
to repo; the resulting
outFile
points to the ObjectTypeDirTree
object that
the mtree
represented.
Properties
path
constructRepoPath :: (IsRepo o, IsFile a) => a -> IO (GValueConstruct o) Source #
remotesConfigDir
constructRepoRemotesConfigDir :: IsRepo o => Text -> IO (GValueConstruct o) Source #
sysrootPath
constructRepoSysrootPath :: (IsRepo o, IsFile a) => a -> IO (GValueConstruct o) Source #
Signals
gpgVerifyResult
type C_RepoGpgVerifyResultCallback = Ptr () -> CString -> Ptr GpgVerifyResult -> Ptr () -> IO () Source #
type RepoGpgVerifyResultCallback = Text -> GpgVerifyResult -> IO () Source #
afterRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> RepoGpgVerifyResultCallback -> m SignalHandlerId Source #
mk_RepoGpgVerifyResultCallback :: C_RepoGpgVerifyResultCallback -> IO (FunPtr C_RepoGpgVerifyResultCallback) Source #
onRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> RepoGpgVerifyResultCallback -> m SignalHandlerId Source #
wrap_RepoGpgVerifyResultCallback :: RepoGpgVerifyResultCallback -> Ptr () -> CString -> Ptr GpgVerifyResult -> Ptr () -> IO () Source #