Modulemd.ModuleIndexMerger¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Modulemd.ModuleIndexMerger(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
A newly-allocated
Modulemd.ModuleIndexMerger
object.- Return type:
New in version 2.0.
- associate_index(index, priority)¶
- Parameters:
index (
Modulemd.ModuleIndex
) – AModulemd.ModuleIndex
, usually constructed by reading the module metadata from a repository withModulemd.ModuleIndex.update_from_file
(),Modulemd.ModuleIndex.update_from_string
(), ormodulemd_module_index_update_from_stream()
. This function take a reference on index, so the caller must not modify it while theModulemd.ModuleIndexMerger
is in use.priority (
int
) – The priority of the repository that the entries in index came from. This is used to determine when index should override rather then merge. In most cases, this will be zero. See the Description section for theModulemd.ModuleIndexMerger
class for details on the merge logic. Acceptable values are in the range of 0-1000.
Enqueues a
Modulemd.ModuleIndex
representing the parsed metadata from a repository into thisModulemd.ModuleIndexMerger
for merging and deduplication of other repositories.Once all repositories have been added, call
Modulemd.ModuleIndexMerger.resolve
() to perform the merge.New in version 2.0.
- resolve()¶
- Raises:
- Returns:
A newly-allocated
Modulemd.ModuleIndex
object containing the merged results. If this function encounters an unresolvable merge conflict, it will returnNone
and set error appropriately.- Return type:
Merges all added
Modulemd.ModuleIndex
objects according to their priority. The logic of this merge is described in the Description ofModulemd.ModuleIndexMerger
.Once this function has been called, the internal state of the
Modulemd.ModuleIndexMerger
is undefined. The only valid action on it after that point isGObject.Object.unref
().This function is equivalent to calling
Modulemd.ModuleIndexMerger.resolve_ext
() withstrict_default_streams=FALSE
.New in version 2.0.
- resolve_ext(strict_default_streams)¶
- Parameters:
strict_default_streams (
bool
) – IfTrue
, merging twoModulemd.Defaults
with conflicting default streams will raise an error. IfFalse
, the module will have its default stream blocked.- Raises:
- Returns:
A newly-allocated
Modulemd.ModuleIndex
object containing the merged results. If this function encounters an unresolvable merge conflict, it will returnNone
and set error appropriately.- Return type:
Merges all added
Modulemd.ModuleIndex
objects according to their priority. The logic of this merge is described in the Description ofModulemd.ModuleIndexMerger
.Once this function has been called, the internal state of the
Modulemd.ModuleIndexMerger
is undefined. The only valid action on it after that point isGObject.Object.unref
().New in version 2.6.