gi-ostree-1.0.2: OSTree bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.OSTree.Objects.Repo

Contents

Description

 

Synopsis

Exported types

newtype Repo Source #

Constructors

Repo (ManagedPtr Repo) 

Instances

GObject Repo Source # 

Methods

gobjectType :: Repo -> IO GType #

IsObject Repo Source # 
IsRepo Repo Source # 
((~) * info (ResolveRepoMethod t Repo), MethodInfo * info Repo p) => IsLabel t (Repo -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Repo -> p #

((~) * info (ResolveRepoMethod t Repo), MethodInfo * info Repo p) => IsLabelProxy t (Repo -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Repo -> p #

HasAttributeList * Repo Source # 
type AttributeList Repo Source # 
type SignalList Repo Source # 

toRepo :: IsRepo o => o -> IO Repo Source #

Methods

Unsupported methods

abortTransaction

repoAbortTransaction Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a 
-> Maybe b 
-> m ()

(Can throw GError)

No description available in the introspection data.

addGpgSignatureSummary

repoAddGpgSignatureSummary Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Self

-> [Text]

keyId: NULL-terminated array of GPG keys.

-> Maybe Text

homedir: GPG home directory, or Nothing

-> Maybe b

cancellable: A Cancellable

-> m ()

(Can throw GError)

Add a GPG signature to a static delta.

appendGpgSignature

repoAppendGpgSignature Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Self

-> Text

commitChecksum: SHA256 of given commit to sign

-> Bytes

signatureBytes: Signature data

-> Maybe b

cancellable: A Cancellable

-> m ()

(Can throw GError)

Append a GPG signature to a commit.

checkoutAt

repoCheckoutAt Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe RepoCheckoutAtOptions

options: Options

-> Int32

destinationDfd: Directory FD for destination

-> Text

destinationPath: Directory for destination

-> Text

commit: Checksum for commit

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data RepoCheckoutGcMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoCheckoutGcMethodInfo a signature Source # 

repoCheckoutGc Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache.

checkoutTree

repoCheckoutTree Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsRepoFile c, IsFileInfo d, IsCancellable e) 
=> a

self: Repo

-> RepoCheckoutMode

mode: Options controlling all files

-> RepoCheckoutOverwriteMode

overwriteMode: Whether or not to overwrite files

-> b

destination: Place tree here

-> c

source: Source tree

-> d

sourceInfo: Source info

-> Maybe e

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: An Repo

-> Maybe b

cancellable: Cancellable

-> m RepoTransactionStats

(Can throw GError)

Complete the transaction. Any refs set with repoTransactionSetRef or repoTransactionSetRefspec will be written out.

copyConfig

data RepoCopyConfigMethodInfo Source #

Instances

((~) * signature (m KeyFile), MonadIO m, IsRepo a) => MethodInfo * RepoCopyConfigMethodInfo a signature Source # 

repoCopyConfig Source #

Arguments

:: (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

data RepoCreateMethodInfo Source #

Instances

((~) * signature (RepoMode -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoCreateMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoCreateMethodInfo a -> signature -> s #

repoCreate Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: An Repo

-> RepoMode

mode: The mode to store the repository in

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data RepoDeleteObjectMethodInfo Source #

Instances

((~) * signature (ObjectType -> Text -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoDeleteObjectMethodInfo a signature Source # 

repoDeleteObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

sha256: Checksum

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data RepoGetConfigMethodInfo Source #

Instances

((~) * signature (m KeyFile), MonadIO m, IsRepo a) => MethodInfo * RepoGetConfigMethodInfo a signature Source # 

repoGetConfig Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a 
-> m KeyFile

Returns: The repository configuration; do not modify

No description available in the introspection data.

getDfd

data RepoGetDfdMethodInfo Source #

Instances

((~) * signature (m Int32), MonadIO m, IsRepo a) => MethodInfo * RepoGetDfdMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoGetDfdMethodInfo a -> signature -> s #

repoGetDfd Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> m Int32

Returns: File descriptor for repository root - owned by self

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

repoGetDisableFsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: An Repo

-> m Bool

Returns: Whether or not fsync() is enabled for this repo.

For more information see repoSetDisableFsync.

getMode

data RepoGetModeMethodInfo Source #

Instances

((~) * signature (m RepoMode), MonadIO m, IsRepo a) => MethodInfo * RepoGetModeMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoGetModeMethodInfo a -> signature -> s #

repoGetMode :: (HasCallStack, MonadIO m, IsRepo a) => a -> m RepoMode Source #

No description available in the introspection data.

getParent

data RepoGetParentMethodInfo Source #

Instances

((~) * signature (m Repo), MonadIO m, IsRepo a) => MethodInfo * RepoGetParentMethodInfo a signature Source # 

repoGetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> m Repo

Returns: Parent repository, or Nothing if none

Before this function can be used, ostree_repo_init() must have been called.

getPath

data RepoGetPathMethodInfo Source #

Instances

((~) * signature (m File), MonadIO m, IsRepo a) => MethodInfo * RepoGetPathMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoGetPathMethodInfo a -> signature -> s #

repoGetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a 
-> m File

Returns: Path to repo

No description available in the introspection data.

getRemoteBooleanOption

repoGetRemoteBooleanOption Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: A OstreeRepo

-> Text

remoteName: Name

-> Text

optionName: Option

-> Bool

defaultValue: Value returned if optionName is not present

-> m Bool

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: A OstreeRepo

-> Text

remoteName: Name

-> Text

optionName: Option

-> m [Text]

(Can throw GError)

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

repoGetRemoteOption Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: A OstreeRepo

-> Text

remoteName: Name

-> Text

optionName: Option

-> Maybe Text

defaultValue: Value returned if optionName is not present

-> m Text

(Can throw GError)

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

repoGpgVerifyData Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) 
=> a

self: Repository

-> Maybe Text

remoteName: Name of remote

-> Bytes

data: Data as a Bytes

-> Bytes

signatures: Signatures as a Bytes

-> Maybe b

keyringdir: Path to directory GPG keyrings; overrides built-in default if given

-> Maybe c

extraKeyring: Path to additional keyring file (not a directory)

-> Maybe d

cancellable: Cancellable

-> m GpgVerifyResult

Returns: an GpgVerifyResult, or Nothing on error (Can throw GError)

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

data RepoHasObjectMethodInfo Source #

Instances

((~) * signature (ObjectType -> Text -> Maybe b -> m Bool), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoHasObjectMethodInfo a signature Source # 

repoHasObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

checksum: ASCII SHA256 checksum

-> Maybe b

cancellable: Cancellable

-> m Bool

(Can throw GError)

Set outHaveObject to True if self contains the given object; False otherwise.

importObjectFrom

data RepoImportObjectFromMethodInfo Source #

Instances

((~) * signature (b -> ObjectType -> Text -> Maybe c -> m ()), MonadIO m, IsRepo a, IsRepo b, IsCancellable c) => MethodInfo * RepoImportObjectFromMethodInfo a signature Source # 

repoImportObjectFrom Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) 
=> a

self: Destination repo

-> b

source: Source repo

-> ObjectType

objtype: Object type

-> Text

checksum: checksum

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) 
=> a

self: Destination repo

-> b

source: Source repo

-> ObjectType

objtype: Object type

-> Text

checksum: checksum

-> Bool

trusted: If True, assume the source repo is valid and trusted

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data RepoIsSystemMethodInfo Source #

Instances

((~) * signature (m Bool), MonadIO m, IsRepo a) => MethodInfo * RepoIsSystemMethodInfo a signature Source # 

repoIsSystem Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

repo: Repository

-> m Bool

Returns: True if this repository is the root-owned system global repository

No description available in the introspection data.

isWritable

data RepoIsWritableMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsRepo a) => MethodInfo * RepoIsWritableMethodInfo a signature Source # 

repoIsWritable Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> m ()

(Can throw GError)

Returns whether the repository is writable by the current user. If the repository is not writable, the error indicates why.

listRefs

data RepoListRefsMethodInfo Source #

Instances

((~) * signature (Maybe Text -> Maybe b -> m (Map Text Text)), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoListRefsMethodInfo a signature Source # 

repoListRefs Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe Text

refspecPrefix: Only list refs which match this prefix

-> Maybe b

cancellable: Cancellable

-> m (Map Text Text)

(Can throw GError)

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

repoListRefsExt Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe Text

refspecPrefix: Only list refs which match this prefix

-> RepoListRefsExtFlags

flags: Options controlling listing behavior

-> Maybe b

cancellable: Cancellable

-> m (Map Text Text)

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe b

cancellable: Cancellable

-> m [Text]

(Can throw GError)

This function synchronously enumerates all static deltas in the repository, returning its result in outDeltas.

loadCommit

data RepoLoadCommitMethodInfo Source #

Instances

((~) * signature (Text -> m (GVariant, [RepoCommitState])), MonadIO m, IsRepo a) => MethodInfo * RepoLoadCommitMethodInfo a signature Source # 

repoLoadCommit Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> Text

checksum: Commit checksum

-> m (GVariant, [RepoCommitState])

(Can throw GError)

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

repoLoadFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

checksum: ASCII SHA256 checksum

-> Maybe b

cancellable: Cancellable

-> m (InputStream, FileInfo, GVariant)

(Can throw GError)

Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes.

loadObjectStream

repoLoadObjectStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

checksum: ASCII SHA256 checksum

-> Maybe b

cancellable: Cancellable

-> m (InputStream, Word64)

(Can throw GError)

Load object as a stream; useful when copying objects between repositories.

loadVariant

repoLoadVariant Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> ObjectType

objtype: Expected object type

-> Text

sha256: Checksum string

-> m GVariant

(Can throw GError)

Load the metadata object sha256 of type objtype, storing the result in outVariant.

loadVariantIfExists

repoLoadVariantIfExists Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

sha256: ASCII checksum

-> m GVariant

(Can throw GError)

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

repoModeFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text 
-> RepoMode 
-> m ()

(Can throw GError)

No description available in the introspection data.

new

repoNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

path: Path to a repository

-> m Repo

Returns: An accessor object for an OSTree repository located at path

No description available in the introspection data.

newDefault

repoNewDefault Source #

Arguments

:: (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 #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsFile b) 
=> a

repoPath: Path to a repository

-> b

sysrootPath: Path to the system root

-> m Repo

Returns: An accessor object for the OSTree repository located at repoPath.

Creates a new Repo instance, taking the system root path explicitly instead of assuming "/".

open

data RepoOpenMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoOpenMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoOpenMethodInfo a -> signature -> s #

repoOpen Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a 
-> Maybe b 
-> m ()

(Can throw GError)

No description available in the introspection data.

prepareTransaction

repoPrepareTransaction Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: An Repo

-> Maybe b

cancellable: Cancellable

-> m Bool

(Can throw GError)

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

data RepoPruneMethodInfo Source #

Instances

((~) * signature (RepoPruneFlags -> Int32 -> Maybe b -> m (Int32, Int32, Word64)), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoPruneMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoPruneMethodInfo a -> signature -> s #

repoPrune Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> RepoPruneFlags

flags: Options controlling prune process

-> Int32

depth: Stop traversal after this many iterations (-1 for unlimited)

-> Maybe b

cancellable: Cancellable

-> m (Int32, Int32, Word64)

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> RepoPruneOptions

options: Options controlling prune process

-> Maybe b

cancellable: Cancellable

-> m (Int32, Int32, Word64)

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe Text

commit: ASCII SHA256 checksum for commit, or Nothing for each non existing commit

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data RepoPullMethodInfo Source #

Instances

((~) * signature (Text -> Maybe [Text] -> [RepoPullFlags] -> Maybe b -> Maybe c -> m ()), MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => MethodInfo * RepoPullMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RepoPullMethodInfo a -> signature -> s #

repoPull Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) 
=> a

self: Repo

-> Text

remoteName: Name of remote

-> Maybe [Text]

refsToFetch: Optional list of refs; if Nothing, fetch all configured refs

-> [RepoPullFlags]

flags: Options controlling fetch behavior

-> Maybe b

progress: Progress

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsAsyncProgress a) 
=> a

progress: Async progress

-> Ptr ()

userData: User data

-> 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

data RepoPullOneDirMethodInfo Source #

Instances

((~) * signature (Text -> Text -> Maybe [Text] -> [RepoPullFlags] -> Maybe b -> Maybe c -> m ()), MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => MethodInfo * RepoPullOneDirMethodInfo a signature Source # 

repoPullOneDir Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) 
=> a

self: Repo

-> Text

remoteName: Name of remote

-> Text

dirToPull: Subdirectory path

-> Maybe [Text]

refsToFetch: Optional list of refs; if Nothing, fetch all configured refs

-> [RepoPullFlags]

flags: Options controlling fetch behavior

-> Maybe b

progress: Progress

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

This is similar to repoPull, but only fetches a single subpath.

pullWithOptions

repoPullWithOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) 
=> a

self: Repo

-> Text

remoteNameOrBaseurl: Name of remote or file:// url

-> GVariant

options: A GVariant a{sv} with an extensible set of flags.

-> Maybe b

progress: Progress

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

Like repoPull, but supports an extensible set of flags. The following are currently defined:

  • refs (as): Array of string refs
  • 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, usefult to do mutliple 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

queryObjectStorageSize

repoQueryObjectStorageSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

sha256: Checksum

-> Maybe b

cancellable: Cancellable

-> m Word64

(Can throw GError)

Return the size in bytes of object with checksum sha256, after any compression has been applied.

readCommit

data RepoReadCommitMethodInfo Source #

Instances

((~) * signature (Text -> Maybe b -> m (File, Text)), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoReadCommitMethodInfo a signature Source # 

repoReadCommit Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

ref: Ref or ASCII checksum

-> Maybe b

cancellable: Cancellable

-> m (File, Text)

(Can throw GError)

Load the content for rev into outRoot.

readCommitDetachedMetadata

repoReadCommitDetachedMetadata Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

checksum: ASCII SHA256 commit checksum

-> Maybe b

cancellable: Cancellable

-> m GVariant

(Can throw GError)

OSTree commits can have arbitrary metadata associated; this function retrieves them. If none exists, outMetadata will be set to Nothing.

regenerateSummary

repoRegenerateSummary Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Maybe GVariant

additionalMetadata: A GVariant of type a{sv}, or Nothing

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

An OSTree repository can contain a high level "summary" file that describes the available branches and other metadata.

It is regenerated automatically after a commit if core/commit-update-summary is set.

reloadConfig

data RepoReloadConfigMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoReloadConfigMethodInfo a signature Source # 

repoReloadConfig Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: repo

-> Maybe b

cancellable: cancellable

-> m ()

(Can throw GError)

By default, an Repo will cache the remote configuration and its own repo/config data. This API can be used to reload it.

remoteAdd

data RepoRemoteAddMethodInfo Source #

Instances

((~) * signature (Text -> Text -> Maybe GVariant -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoRemoteAddMethodInfo a signature Source # 

repoRemoteAdd Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

name: Name of remote

-> Text

url: URL for remote (if URL begins with metalink=, it will be used as such)

-> Maybe GVariant

options: GVariant of type a{sv}

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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

repoRemoteChange Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) 
=> a

self: Repo

-> Maybe b

sysroot: System root

-> RepoRemoteChange

changeop: Operation to perform

-> Text

name: Name of remote

-> Text

url: URL for remote (if URL begins with metalink=, it will be used as such)

-> Maybe GVariant

options: GVariant of type a{sv}

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

A combined function handling the equivalent of repoRemoteAdd, repoRemoteDelete, with more options.

remoteDelete

data RepoRemoteDeleteMethodInfo Source #

Instances

((~) * signature (Text -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoRemoteDeleteMethodInfo a signature Source # 

repoRemoteDelete Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

name: Name of remote

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Delete the remote named name. It is an error if the provided remote does not exist.

remoteFetchSummary

repoRemoteFetchSummary Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Self

-> Text

name: name of a remote

-> Maybe b

cancellable: a Cancellable

-> m (Bytes, Bytes)

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Self

-> Text

name: name of a remote

-> Maybe GVariant

options: A GVariant a{sv} with an extensible set of flags

-> Maybe b

cancellable: a Cancellable

-> m (Bytes, Bytes)

(Can throw GError)

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

remoteGetGpgVerify

repoRemoteGetGpgVerify Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> Text

name: Name of remote

-> m Bool

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> Text

name: Name of remote

-> m Bool

(Can throw GError)

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

data RepoRemoteGetUrlMethodInfo Source #

Instances

((~) * signature (Text -> m Text), MonadIO m, IsRepo a) => MethodInfo * RepoRemoteGetUrlMethodInfo a signature Source # 

repoRemoteGetUrl Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> Text

name: Name of remote

-> m Text

(Can throw GError)

Return the URL of the remote named name through outUrl. It is an error if the provided remote does not exist.

remoteGpgImport

repoRemoteGpgImport Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) 
=> a

self: Self

-> Text

name: name of a remote

-> Maybe b

sourceStream: a InputStream, or Nothing

-> Maybe [Text]

keyIds: a Nothing-terminated array of GPG key IDs, or Nothing

-> Word32

outImported: return location for the number of imported keys, or Nothing

-> Maybe c

cancellable: a Cancellable

-> m ()

(Can throw GError)

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

data RepoRemoteListMethodInfo Source #

Instances

((~) * signature (m [Text]), MonadIO m, IsRepo a) => MethodInfo * RepoRemoteListMethodInfo a signature Source # 

repoRemoteList Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> m [Text]

Returns: a Nothing-terminated array of remote names

List available remote names in an Repo. Remote names are sorted alphabetically. If no remotes are available the function returns Nothing.

remoteListRefs

repoRemoteListRefs Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

remoteName: Name of the remote.

-> Maybe b

cancellable: Cancellable

-> m (Map Text Text)

(Can throw GError)

No description available in the introspection data.

resolveRev

data RepoResolveRevMethodInfo Source #

Instances

((~) * signature (Text -> Bool -> m Text), MonadIO m, IsRepo a) => MethodInfo * RepoResolveRevMethodInfo a signature Source # 

repoResolveRev Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> Text

refspec: A refspec

-> Bool

allowNoent: Do not throw an error if refspec does not exist

-> m Text

(Can throw GError)

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

repoResolveRevExt Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> Text

refspec: A refspec

-> Bool

allowNoent: Do not throw an error if refspec does not exist

-> RepoResolveRevExtFlags

flags: Options controlling behavior

-> m Text

(Can throw GError)

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

data RepoScanHardlinksMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoScanHardlinksMethodInfo a signature Source # 

repoScanHardlinks Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: An Repo

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data RepoSetCacheDirMethodInfo Source #

Instances

((~) * signature (Int32 -> Text -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoSetCacheDirMethodInfo a signature Source # 

repoSetCacheDir Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: An Repo

-> Int32

dfd: directory fd

-> Text

path: subpath in dfd

-> Maybe b

cancellable: a Cancellable

-> m ()

(Can throw GError)

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

data RepoSetDisableFsyncMethodInfo Source #

Instances

((~) * signature (Bool -> m ()), MonadIO m, IsRepo a) => MethodInfo * RepoSetDisableFsyncMethodInfo a signature Source # 

repoSetDisableFsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: An Repo

-> Bool

disableFsync: If True, do not fsync

-> 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

repoSetRefImmediate Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: An Repo

-> Maybe Text

remote: A remote for the ref

-> Text

ref: The ref to write

-> Maybe Text

checksum: The checksum to point it to, or Nothing to unset

-> Maybe b

cancellable: GCancellable

-> m ()

(Can throw GError)

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

data RepoSignCommitMethodInfo Source #

Instances

((~) * signature (Text -> Text -> Maybe Text -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoSignCommitMethodInfo a signature Source # 

repoSignCommit Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Self

-> Text

commitChecksum: SHA256 of given commit to sign

-> Text

keyId: Use this GPG key id

-> Maybe Text

homedir: GPG home directory, or Nothing

-> Maybe b

cancellable: A Cancellable

-> m ()

(Can throw GError)

Add a GPG signature to a commit.

signDelta

data RepoSignDeltaMethodInfo Source #

Instances

((~) * signature (Text -> Text -> Text -> Text -> Maybe b -> m ()), MonadIO m, IsRepo a, IsCancellable b) => MethodInfo * RepoSignDeltaMethodInfo a signature Source # 

repoSignDelta Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a 
-> Text 
-> Text 
-> Text 
-> Text 
-> Maybe b 
-> m ()

(Can throw GError)

This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta.

staticDeltaExecuteOffline

repoStaticDeltaExecuteOffline Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) 
=> a

self: Repo

-> b

dirOrFile: Path to a directory containing static delta data, or directly to the superblock

-> Bool

skipValidation: If True, assume data integrity

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> StaticDeltaGenerateOpt

opt: High level optimization choice

-> Text

from: ASCII SHA256 checksum of origin, or Nothing

-> Text

to: ASCII SHA256 checksum of target

-> Maybe GVariant

metadata: Optional metadata

-> Maybe GVariant

params: Parameters, see below

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: An Repo

-> Maybe Text

remote: A remote for the ref

-> Text

ref: The ref to write

-> Text

checksum: The checksum to point it to

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: An Repo

-> Text

refspec: The refspec to write

-> Text

checksum: The checksum to point it to

-> m () 

Like repoTransactionSetRef, but takes concatenated refspec format as input instead of separate remote and name arguments.

verifyCommit

data RepoVerifyCommitMethodInfo Source #

Instances

((~) * signature (Text -> Maybe b -> Maybe c -> Maybe d -> m ()), MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => MethodInfo * RepoVerifyCommitMethodInfo a signature Source # 

repoVerifyCommit Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) 
=> a

self: Repository

-> Text

commitChecksum: ASCII SHA256 checksum

-> Maybe b

keyringdir: Path to directory GPG keyrings; overrides built-in default if given

-> Maybe c

extraKeyring: Path to additional keyring file (not a directory)

-> Maybe d

cancellable: Cancellable

-> m ()

(Can throw GError)

Check for a valid GPG signature on commit named by the ASCII checksum commitChecksum.

verifyCommitExt

repoVerifyCommitExt Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) 
=> a

self: Repository

-> Text

commitChecksum: ASCII SHA256 checksum

-> Maybe b

keyringdir: Path to directory GPG keyrings; overrides built-in default if given

-> Maybe c

extraKeyring: Path to additional keyring file (not a directory)

-> Maybe d

cancellable: Cancellable

-> m GpgVerifyResult

Returns: an GpgVerifyResult, or Nothing on error (Can throw GError)

Read GPG signature(s) on the commit named by the ASCII checksum commitChecksum and return detailed results.

verifyCommitForRemote

repoVerifyCommitForRemote Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repository

-> Text

commitChecksum: ASCII SHA256 checksum

-> Text

remoteName: OSTree remote to use for configuration

-> Maybe b

cancellable: Cancellable

-> m GpgVerifyResult

Returns: an GpgVerifyResult, or Nothing on error (Can throw GError)

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

repoVerifySummary Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

remoteName: Name of remote

-> Bytes

summary: Summary data as a Bytes

-> Bytes

signatures: Summary signatures as a Bytes

-> Maybe b

cancellable: Cancellable

-> m GpgVerifyResult

Returns: an GpgVerifyResult, or Nothing on error (Can throw GError)

Verify signatures for summary data using GPG keys in the keyring for remoteName, and return an GpgVerifyResult.

writeArchiveToMtree

repoWriteArchiveToMtree Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) 
=> a

self: An Repo

-> b

archive: A path to an archive file

-> c

mtree: The MutableTree to write to

-> Maybe RepoCommitModifier

modifier: Optional commit modifier

-> Bool

autocreateParents: Autocreate parent directories

-> Maybe d

cancellable: Cancellable

-> m ()

(Can throw GError)

Import an archive file archive into the repository, and write its file structure to mtree.

writeCommit

repoWriteCommit Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) 
=> a

self: Repo

-> Maybe Text

parent: ASCII SHA256 checksum for parent, or Nothing for none

-> Maybe Text

subject: Subject

-> Maybe Text

body: Body

-> Maybe GVariant

metadata: GVariant of type a{sv}, or Nothing for none

-> b

root: The tree to point the commit to

-> Maybe c

cancellable: Cancellable

-> m Text

(Can throw GError)

Write a commit metadata object, referencing rootContentsChecksum and rootMetadataChecksum.

writeCommitDetachedMetadata

repoWriteCommitDetachedMetadata Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> Text

checksum: ASCII SHA256 commit checksum

-> Maybe GVariant

metadata: Metadata to associate with commit in with format "a{sv}", or Nothing to delete

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) 
=> a

self: Repo

-> Maybe Text

parent: ASCII SHA256 checksum for parent, or Nothing for none

-> Maybe Text

subject: Subject

-> Maybe Text

body: Body

-> Maybe GVariant

metadata: GVariant of type a{sv}, or Nothing for none

-> b

root: The tree to point the commit to

-> Word64

time: The time to use to stamp the commit

-> Maybe c

cancellable: Cancellable

-> m Text

(Can throw GError)

Write a commit metadata object, referencing rootContentsChecksum and rootMetadataChecksum.

writeConfig

data RepoWriteConfigMethodInfo Source #

Instances

((~) * signature (KeyFile -> m ()), MonadIO m, IsRepo a) => MethodInfo * RepoWriteConfigMethodInfo a signature Source # 

repoWriteConfig Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a) 
=> a

self: Repo

-> KeyFile

newConfig: Overwrite the config file with this data. Do not change later!

-> m ()

(Can throw GError)

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

repoWriteContent Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) 
=> a

self: Repo

-> Maybe Text

expectedChecksum: If provided, validate content against this checksum

-> b

objectInput: Content object stream

-> Word64

length: Length of objectInput

-> Maybe c

cancellable: Cancellable

-> m ByteString

(Can throw GError)

Store the content object streamed as objectInput, with total length length. The actual checksum will be returned as outCsum.

writeContentAsync

repoWriteContentAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) 
=> a

self: Repo

-> Maybe Text

expectedChecksum: If provided, validate content against this checksum

-> b

object: Input

-> Word64

length: Length of object

-> Maybe c

cancellable: Cancellable

-> Maybe AsyncReadyCallback

callback: Invoked when content is writed

-> m () 

Asynchronously store the content object object. If provided, the checksum expectedChecksum will be verified.

writeContentFinish

repoWriteContentFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) 
=> a

self: a Repo

-> b

result: a AsyncResult

-> m Word8

(Can throw GError)

Completes an invocation of repoWriteContentAsync.

writeContentTrusted

repoWriteContentTrusted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) 
=> a

self: Repo

-> Text

checksum: Store content using this ASCII SHA256 checksum

-> b

objectInput: Content stream

-> Word64

length: Length of objectInput

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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

repoWriteDfdToMtree Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) 
=> a

self: Repo

-> Int32

dfd: Directory file descriptor

-> Text

path: Path

-> b

mtree: Overlay directory contents into this tree

-> Maybe RepoCommitModifier

modifier: Optional modifier

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) 
=> a

self: Repo

-> b

dir: Path to a directory

-> c

mtree: Overlay directory contents into this tree

-> Maybe RepoCommitModifier

modifier: Optional modifier

-> Maybe d

cancellable: Cancellable

-> m ()

(Can throw GError)

Store objects for dir and all children into the repository self, overlaying the resulting filesystem hierarchy into mtree.

writeMetadata

repoWriteMetadata Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Maybe Text

expectedChecksum: If provided, validate content against this checksum

-> GVariant

object: Metadata

-> Maybe b

cancellable: Cancellable

-> m ByteString

(Can throw GError)

Store the metadata object variant. Return the checksum as outCsum.

If expectedChecksum is not Nothing, verify it against the computed checksum.

writeMetadataAsync

repoWriteMetadataAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Maybe Text

expectedChecksum: If provided, validate content against this checksum

-> GVariant

object: Metadata

-> Maybe b

cancellable: Cancellable

-> Maybe AsyncReadyCallback

callback: Invoked when metadata is writed

-> m () 

Asynchronously store the metadata object variant. If provided, the checksum expectedChecksum will be verified.

writeMetadataFinish

repoWriteMetadataFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) 
=> a 
-> b 
-> Word8 
-> m ()

(Can throw GError)

No description available in the introspection data.

writeMetadataStreamTrusted

repoWriteMetadataStreamTrusted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

checksum: Store object with this ASCII SHA256 checksum

-> b

objectInput: Metadata object stream

-> Word64

length: Length, may be 0 for unknown

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

Store the metadata object variant; the provided checksum is trusted.

writeMetadataTrusted

repoWriteMetadataTrusted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) 
=> a

self: Repo

-> ObjectType

objtype: Object type

-> Text

checksum: Store object with this ASCII SHA256 checksum

-> GVariant

variant: Metadata object

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Store the metadata object variant; the provided checksum is trusted.

writeMtree

data RepoWriteMtreeMethodInfo Source #

Instances

((~) * signature (b -> Maybe c -> m File), MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) => MethodInfo * RepoWriteMtreeMethodInfo a signature Source # 

repoWriteMtree Source #

Arguments

:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) 
=> a

self: Repo

-> b

mtree: Mutable tree

-> Maybe c

cancellable: Cancellable

-> m File

(Can throw GError)

Write all metadata objects for mtree to repo; the resulting outFile points to the ObjectTypeDirTree object that the mtree represented.

Properties

path

data RepoPathPropertyInfo Source #

Instances

AttrInfo RepoPathPropertyInfo Source # 
type AttrOrigin RepoPathPropertyInfo Source # 
type AttrLabel RepoPathPropertyInfo Source # 
type AttrGetType RepoPathPropertyInfo Source # 
type AttrBaseTypeConstraint RepoPathPropertyInfo Source # 
type AttrSetTypeConstraint RepoPathPropertyInfo Source # 
type AttrAllowedOps RepoPathPropertyInfo Source # 

getRepoPath :: (MonadIO m, IsRepo o) => o -> m File Source #

remotesConfigDir

data RepoRemotesConfigDirPropertyInfo Source #

Instances

AttrInfo RepoRemotesConfigDirPropertyInfo Source # 
type AttrOrigin RepoRemotesConfigDirPropertyInfo Source # 
type AttrLabel RepoRemotesConfigDirPropertyInfo Source # 
type AttrLabel RepoRemotesConfigDirPropertyInfo = "remotes-config-dir"
type AttrGetType RepoRemotesConfigDirPropertyInfo Source # 
type AttrBaseTypeConstraint RepoRemotesConfigDirPropertyInfo Source # 
type AttrSetTypeConstraint RepoRemotesConfigDirPropertyInfo Source # 
type AttrAllowedOps RepoRemotesConfigDirPropertyInfo Source # 

sysrootPath

data RepoSysrootPathPropertyInfo Source #

Instances

AttrInfo RepoSysrootPathPropertyInfo Source # 
type AttrOrigin RepoSysrootPathPropertyInfo Source # 
type AttrLabel RepoSysrootPathPropertyInfo Source # 
type AttrGetType RepoSysrootPathPropertyInfo Source # 
type AttrBaseTypeConstraint RepoSysrootPathPropertyInfo Source # 
type AttrSetTypeConstraint RepoSysrootPathPropertyInfo Source # 
type AttrAllowedOps RepoSysrootPathPropertyInfo Source # 

Signals

gpgVerifyResult