OSTree.RepoFinderResult¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
finder |
r/w |
the |
|
padding |
[ |
r |
|
priority |
r/w |
static priority of the result, where higher numbers indicate lower priority |
|
ref_to_checksum |
r/w |
map of collection–ref pairs to checksums provided by this remote; values may be |
|
ref_to_timestamp |
r/w |
map of collection–ref pairs to timestamps; values may be 0 for various reasons |
|
remote |
r/w |
|
|
summary_last_modified |
r/w |
Unix timestamp (seconds since the epoch, UTC) when the summary file on the remote was last modified, or |
Methods¶
class |
|
class |
|
|
|
|
|
|
Details¶
- class OSTree.RepoFinderResult¶
OSTree.RepoFinderResult
gives a single result from anOSTree.RepoFinder.resolve_async
() orOSTree.RepoFinder.resolve_all_async
() operation. This represents a single remote which provides none, some or all of the refs being resolved. The structure includes various bits of metadata which allowOSTree.Repo.pull_from_remotes_async
() (for example) to prioritise how to pull the refs.An
OSTree.RepoFinderResult
is immutable after construction.The priority is used as one input of many to ordering functions like
OSTree.RepoFinderResult.compare
().ref_to_checksum indicates which refs (out of the ones queried for as inputs to
OSTree.RepoFinder.resolve_async
()) are provided by this remote. The refs are present as keys (of typeOSTree.CollectionRef
), and the corresponding values are the checksums of the commits the remote currently has for those refs. (These might not be the latest commits available out of all results.) A checksum may beNone
if the remote does not advertise the corresponding ref. AfterOSTree.RepoFinder.resolve_async
() has been called, the commit metadata should be available locally, so the details for each checksum can be looked up usingOSTree.Repo.load_commit
().ref_to_timestamp provides timestamps for the set of refs in ref_to_checksum. The refs are keys (of type
OSTree.CollectionRef
) and the values are guint64 pointers with the timestamp associated with the checksum provided in ref_to_checksum. ref_to_timestamp can beNone
, and when it’s not, the timestamps are zero when any of the following conditions are met: (1) the override-commit-ids option was used onOSTree.Repo.find_remotes_async
(2) there was an error in trying to get the commit metadata (3) the checksum for this ref isNone
in ref_to_checksum.New in version 2018.6.
- classmethod freev(results)¶
- Parameters:
results ([
OSTree.RepoFinderResult
]) – anOSTree.RepoFinderResult
Free the given results array, freeing each element and the container.
New in version 2018.6.
- classmethod new(remote, finder, priority, ref_to_checksum, ref_to_timestamp, summary_last_modified)¶
- Parameters:
remote (
OSTree.Remote
) – anOSTree.Remote
containing the transport details for the resultfinder (
OSTree.RepoFinder
) – theOSTree.RepoFinder
instance which produced the resultpriority (
int
) – static priority of the result, where higher numbers indicate lower priorityref_to_checksum ({
OSTree.CollectionRef
:str
}) – map of collection–ref pairs to checksums provided by this resultref_to_timestamp ({
OSTree.CollectionRef
:int
} orNone
) – map of collection–ref pairs to timestamps provided by this resultsummary_last_modified (
int
) – Unix timestamp (seconds since the epoch, UTC) when the summary file for the result was last modified, or0
if this is unknown
- Returns:
a new
OSTree.RepoFinderResult
- Return type:
Create a new
OSTree.RepoFinderResult
instance. The semantics for the arguments are as described in theOSTree.RepoFinderResult
documentation.New in version 2018.6.
- compare(b)¶
- Parameters:
- Returns:
<0 if self is ordered before b, 0 if they are ordered equally, >0 if b is ordered before self
- Return type:
Compare two
OSTree.RepoFinderResult
instances to work out which one is better to pull from, and hence needs to be ordered before the other.New in version 2018.6.
- dup()¶
- Returns:
a newly allocated copy of self
- Return type:
Copy an
OSTree.RepoFinderResult
.New in version 2018.6.
- free()¶
Free the given self.
New in version 2018.6.