OSTree.RepoFinder¶
- Implementations:
OSTree.RepoFinderAvahi
,OSTree.RepoFinderConfig
,OSTree.RepoFinderMount
,OSTree.RepoFinderOverride
Methods¶
class |
|
class |
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class OSTree.RepoFinder¶
- Bases:
- Structure:
- classmethod resolve_all_async(finders, refs, parent_repo, cancellable, callback, *user_data)¶
- Parameters:
finders ([
OSTree.RepoFinder
]) – non-empty array ofOSTree.RepoFinders
refs ([
OSTree.CollectionRef
]) – non-empty array of collection–ref pairs to find remotes forparent_repo (
OSTree.Repo
) – the local repository which the refs are being resolved for, which provides configuration information and GPG keyscancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – asynchronous completion callback
A version of
OSTree.RepoFinder.resolve_async
() which queries one or more finders in parallel and combines the results.New in version 2018.6.
- classmethod resolve_all_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) –Gio.AsyncResult
from the callback- Raises:
- Returns:
array of zero or more results
- Return type:
Get the results from a
OSTree.RepoFinder.resolve_all_async
() operation.New in version 2018.6.
- resolve_async(refs, parent_repo, cancellable, callback, *user_data)¶
- Parameters:
refs ([
OSTree.CollectionRef
]) – non-empty array of collection–ref pairs to find remotes forparent_repo (
OSTree.Repo
) – the local repository which the refs are being resolved for, which provides configuration information and GPG keyscancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – asynchronous completion callback
Find reachable remote URIs which claim to provide any of the given refs. The specific method for finding the remotes depends on the
OSTree.RepoFinder
implementation.Any remote which is found and which claims to support any of the given refs will be returned in the results. It is possible that a remote claims to support a given ref, but turns out not to — it is not possible to verify this until
OSTree.Repo.pull_from_remotes_async
() is called.The returned results will be sorted with the most useful first — this is typically the remote which claims to provide the most refs, at the lowest latency.
Each result contains a mapping of refs to the checksums of the commits which the result provides. If the result provides the latest commit for a ref across all of the results, the checksum will be set. Otherwise, if the result provides an outdated commit, or doesn’t provide a given ref at all, the checksum will not be set. Results which provide none of the requested refs may be listed with an empty refs map.
Pass the results to
OSTree.Repo.pull_from_remotes_async
() to pull the given refs from those remotes.New in version 2018.6.
- resolve_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) –Gio.AsyncResult
from the callback- Raises:
- Returns:
array of zero or more results
- Return type:
Get the results from a
OSTree.RepoFinder.resolve_async
() operation.New in version 2018.6.
- do_resolve_async(refs, parent_repo, cancellable, callback, *user_data) virtual¶
- Parameters:
refs ([
OSTree.CollectionRef
]) – non-empty array of collection–ref pairs to find remotes forparent_repo (
OSTree.Repo
) – the local repository which the refs are being resolved for, which provides configuration information and GPG keyscancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – asynchronous completion callback
Find reachable remote URIs which claim to provide any of the given refs. The specific method for finding the remotes depends on the
OSTree.RepoFinder
implementation.Any remote which is found and which claims to support any of the given refs will be returned in the results. It is possible that a remote claims to support a given ref, but turns out not to — it is not possible to verify this until
OSTree.Repo.pull_from_remotes_async
() is called.The returned results will be sorted with the most useful first — this is typically the remote which claims to provide the most refs, at the lowest latency.
Each result contains a mapping of refs to the checksums of the commits which the result provides. If the result provides the latest commit for a ref across all of the results, the checksum will be set. Otherwise, if the result provides an outdated commit, or doesn’t provide a given ref at all, the checksum will not be set. Results which provide none of the requested refs may be listed with an empty refs map.
Pass the results to
OSTree.Repo.pull_from_remotes_async
() to pull the given refs from those remotes.New in version 2018.6.
- do_resolve_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) –Gio.AsyncResult
from the callback- Returns:
array of zero or more results
- Return type:
Get the results from a
OSTree.RepoFinder.resolve_async
() operation.New in version 2018.6.