Initialize a new #ModulemdBuildConfig representing a module build configuration. Add a build-time dependency for this module. This #ModulemdBuildConfig object. The name of the module to depend on. The name of the module stream to depend on. Add a build-time dependency for this module. This #ModulemdBuildConfig object. The name of the module to depend on. The name of the module stream to depend on. Remove all build-time dependencies for this module. This #ModulemdBuildConfig object. Remove all run-time dependencies for this module. This #ModulemdBuildConfig object. Less than zero if @self_1 sorts less than @self_2, zero for equal, greater than zero if @self_1 is greater than @self_2. A pointer to a #ModulemdBuildConfig object. A pointer to a #ModulemdBuildConfig object. A deep copy of @self This #ModulemdBuildConfig object TRUE, if @self_1 and @self_2 are pointers to #ModulemdBuildConfig objects containing equivalent data. FALSE, otherwise. A pointer to a #ModulemdBuildConfig object. A pointer to a #ModulemdBuildConfig object. The build options for this module's components. This #ModulemdBuildConfig object. An ordered #GStrv list of module names that this module depends on at build-time. This #ModulemdBuildConfig object. The name of the stream matching this module name in the build-time dependencies. This #ModulemdBuildConfig object. The name of the module this module depends on. Get the context that this build configuration produces. Note: This function returns the context as stored internally. If you want to be sure that it is in the correct format, call modulemd_build_config_validate() first. The string representing the context that this build configuration produces. This #ModulemdBuildConfig object. Get the platform that this build configuration applies to. The string representing the platform that this build configuration applies to. This #ModulemdBuildConfig object. An ordered #GStrv list of module names that this module depends on at run-time. This #ModulemdBuildConfig object. The name of the stream matching this module name in the run-time dependencies. This #ModulemdBuildConfig object. The name of the module this module depends on. Remove a build-time dependency for this module. This #ModulemdBuildConfig object. The name of the module to be removed. Remove a run-time dependency for this module. This #ModulemdBuildConfig object. The name of the module to be removed. Set build options for this module's components. This #ModulemdBuildConfig object. A #ModulemdBuildopts object describing build options that apply globally to components in this module. Set the context that this build configuration produces. Note: For consistency in the API, this function does not validate the input @context. This validation will be performed as part of the modulemd_build_config_validate() routine where it can be reported cleanly. This #ModulemdBuildConfig object. A string of up to ten alphanumeric characters. Set the platform that this build configuration applies to. This #ModulemdBuildConfig object. A string of up to ten alphanumeric characters. Determine if this #ModulemdBuildConfig is valid according to the YAML specification. TRUE if validation passes. Returns FALSE and sets @error appropriately on validation failure. This #ModulemdBuildConfig object. A newly-allocated #ModulemdBuildopts object. This object must be freed with g_object_unref(). Restrict the list of architectures for which to build this module. It may be called any number of times to indicate support on additional architectures. Use modulemd_buildopts_clear_arches() to return to "all architectures". This #ModulemdBuildopts object. An architecture for which to build this module. This #ModulemdBuildopts object. An RPM name to add to the whitelist. Indicate that this module should be built for all architectures. This #ModulemdBuildopts object. Remove all RPMs from the whitelist. This #ModulemdBuildopts object. Create a copy of this #ModulemdBuildopts object. A newly-allocated #ModulemdBuildopts object that is a copy of @self. This #ModulemdBuildopts object. Check for equality for two #ModulemdBuildopts objects. TRUE if both objects are equal, FALSE otherwise. A #ModulemdBuildopts object. A #ModulemdBuildopts object. A #GStrv list of architectures for which this module should be built. If empty, this module should be built for all architectures. This #ModulemdBuildopts object. A string containing RPM build macros in the form that they would appear in an RPM macros file on-disk. This #ModulemdBuildopts object. An ordered #GStrv list of all RPMs in the whitelist. This #ModulemdBuildopts object. This #ModulemdBuildopts object. An architecture to remove from the list of architectures for which to build this module. This #ModulemdBuildopts object. An RPM name to remove from the whitelist. This #ModulemdBuildopts object. A string containing RPM build macros in the form that they would appear in an RPM macros file on-disk. A newly-allocated copy of @self. This #ModulemdComponent object. An optional new key for the copied component which is used as the lookup key when this component is attached to a #ModulemdModuleStream. TRUE, if both the objects are equal. FALSE, otherwise. A #ModulemdComponent object. A #ModulemdComponent object. The name of the component. Note that this may be different from the key used to save this component to a #ModulemdModuleStream. If you specifically need the key, use modulemd_component_get_key() instead. This #ModulemdComponent object. This #ModulemdComponent object. The name of this component. Note that this is different from the key used to save this component to a #ModulemdModuleStream. If this value is set, it adds a "name:" attribute to this component. This is used in bootstrapping cases where the key is a different name used to differentiate multiple ordered builds of the same component name. This function is currently only implemented for #ModulemdComponentRpm and has no effect on other #ModulemdComponent types. Verifies that all stored values are internally consistent and that the component is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents. TRUE if the #ModulemdComponent passed validation. FALSE and sets @error appropriately if validation fails. This #ModulemdComponent object. Add a build dependency of this component. This #ModulemdComponent object. A key representing another component in the #ModulemdModuleStream components map. Remove all buildafter entries for this component. This #ModulemdComponent object. A newly-allocated copy of @self. This #ModulemdComponent object. An optional new key for the copied component which is used as the lookup key when this component is attached to a #ModulemdModuleStream. TRUE, if both the objects are equal. FALSE, otherwise. A #ModulemdComponent object. A #ModulemdComponent object. The set of component keys that this component depends upon. This #ModulemdComponent object. TRUE if this component is used only for building this module. This #ModulemdComponent object. The value of the buildorder. This #ModulemdComponent object. The name of the key used to attach this component to a #ModulemdModuleStream. This #ModulemdComponent object. The name of the component. Note that this may be different from the key used to save this component to a #ModulemdModuleStream. If you specifically need the key, use modulemd_component_get_key() instead. This #ModulemdComponent object. The rationale. This #ModulemdComponent object. This #ModulemdComponent object. Whether this component is used only for building this module. If set to TRUE, the build system should add any artifacts produced by this component to the data.filters section of the output modulemd. This #ModulemdComponent object. The order this component should be built relative to others. This #ModulemdComponent object. The name of this component. Note that this is different from the key used to save this component to a #ModulemdModuleStream. If this value is set, it adds a "name:" attribute to this component. This is used in bootstrapping cases where the key is a different name used to differentiate multiple ordered builds of the same component name. This function is currently only implemented for #ModulemdComponentRpm and has no effect on other #ModulemdComponent types. This #ModulemdComponent object. The reason that this component is part of the stream. Verifies that all stored values are internally consistent and that the component is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents. TRUE if the #ModulemdComponent passed validation. FALSE and sets @error appropriately if validation fails. This #ModulemdComponent object. A newly-allocated copy of @self. This #ModulemdComponent object. An optional new key for the copied component which is used as the lookup key when this component is attached to a #ModulemdModuleStream. This #ModulemdComponent object. The name of this component. Note that this is different from the key used to save this component to a #ModulemdModuleStream. If this value is set, it adds a "name:" attribute to this component. This is used in bootstrapping cases where the key is a different name used to differentiate multiple ordered builds of the same component name. This function is currently only implemented for #ModulemdComponentRpm and has no effect on other #ModulemdComponent types. The name of the component. Note that this may be different from the key used to save this component to a #ModulemdModuleStream. If you specifically need the key, use modulemd_component_get_key() instead. This #ModulemdComponent object. TRUE if the #ModulemdComponent passed validation. FALSE and sets @error appropriately if validation fails. This #ModulemdComponent object. TRUE, if both the objects are equal. FALSE, otherwise. A #ModulemdComponent object. A #ModulemdComponent object. A newly-allocated #ModulemdComponentModule object. The key of this module component. Used when looking up components from a #ModulemdModuleStream. The commit ID in the SCM repository. This #ModulemdComponentModule object. The URI of the SCM repository. This #ModulemdComponentModule object. This #ModulemdComponentModule object. The commit ID in the SCM repository. This #ModulemdComponentModule object. The URI of the SCM repository. A newly-allocated #ModulemdComponentRpm object. The key of this module component. Used when looking up components from a #ModulemdModuleStream. Add an architecture on which this RPM will be multilib. It may be called any number of times. Use modulemd_component_rpm_clear_multilib_arches() to return to "no architectures". This #ModulemdComponentRpm object. An architecture on which this package should be multilib. Restrict the list of architectures on which this RPM will be available. It may be called any number of times to indicate support on additional architectures. Use modulemd_component_rpm_clear_arches() to return to "all architectures". This #ModulemdComponentRpm object. An architecture on which this package should be available. Indicate that this RPM component is available on all arches. This #ModulemdComponentRpm object. Indicate that this RPM component is multilib on no architectures. This #ModulemdComponentRpm object. A #GStrv list of architectures on which this RPM should be available. This #ModulemdComponentRpm object. The #ModulemdComponentRpm:buildroot flag. This #ModulemdComponentRpm object. The lookaside cache URL. This #ModulemdComponentRpm object. A #GStrv list of architectures on which multilib should be available. This #ModulemdComponentRpm object. The commit ID in the SCM repository. This #ModulemdComponentRpm object. The URI of the SCM repository. This #ModulemdComponentRpm object. The #ModulemdComponentRpm:srpm_buildroot flag. This #ModulemdComponentRpm object. Indicate that this RPM component is available on all arches. Use modulemd_component_rpm_clear_arches() instead. This #ModulemdComponentRpm object. Indicate that this RPM component is multilib on no architectures. Use modulemd_component_rpm_clear_multilib_arches() instead. This #ModulemdComponentRpm object. This #ModulemdComponentRpm object. The #ModulemdComponentRpm:buildroot flag to set for @self. This #ModulemdComponentRpm object. The lookaside cache URL. This #ModulemdComponentRpm object. The commit ID in the SCM repository. This #ModulemdComponentRpm object. The URI of the SCM repository. This #ModulemdComponentRpm object. The #ModulemdComponentRpm:srpm_buildroot flag to set for @self. Zstandard compression; since 2.15 Autodetection failure Unknown compression No compression gzip compression bzip2 compression LZMA compression zchunk compression Enum list terminator Create a new #ModulemdDefaults. A newly created #ModulemdDefaults subtype of the requested version. The version of the defaults metadata to create. The name of the module to which these defaults apply. A newly-allocated copy of @self. This #ModulemdDefaults object. TRUE if both @self_1 and @self_2 contain equal values, FALSE if they differed. A #ModulemdDefaults object A #ModulemdDefaults object The metadata version of this defaults object. This #ModulemdDefaults object. TRUE if validation passed, FALSE and sets @error appropriately if validation failed. This #ModulemdDefaults object. A newly-allocated copy of @self. This #ModulemdDefaults object. TRUE if both @self_1 and @self_2 contain equal values, FALSE if they differed. A #ModulemdDefaults object A #ModulemdDefaults object The metadata version of this defaults object. This #ModulemdDefaults object. The last modified time represented as a 64-bit integer (such as 201807011200) This #ModulemdDefaults object. The name of the module to which these defaults apply. This #ModulemdDefaults object. This #ModulemdDefaults object. The last modified time represented as a 64-bit integer (such as 201807011200) A newly-allocated copy of @self upgraded to the requested defaults version. NULL if the upgrade cannot be performed and sets @error appropriately. This function does not modify @self. This #ModulemdDefaults object. The version to upgrade to. TRUE if validation passed, FALSE and sets @error appropriately if validation failed. This #ModulemdDefaults object. A newly-allocated copy of @self. This #ModulemdDefaults object. TRUE if validation passed, FALSE and sets @error appropriately if validation failed. This #ModulemdDefaults object. The metadata version of this defaults object. This #ModulemdDefaults object. TRUE if both @self_1 and @self_2 contain equal values, FALSE if they differed. A #ModulemdDefaults object A #ModulemdDefaults object A newly-allocated #ModulemdDefaultsV1 object. The name of the module to which these defaults apply. Add a profile that will be installed for this stream if none are explicitly specified by the user. This function may be called any number of times for the same stream and will deduplicate input. This #ModulemdDefaultsV1 object. The name of the module stream to which to add this default profile. The name of the default profile to add. The name of the system intent to add profile defaults to. If NULL, this sets the generic fallback profiles for the stream. System intents are deprecated and calls with this non-NULL argument will become void in the future. A sorted #GStrv list of unique profiles to be installed by default for this stream. NULL, if this stream_name is not present in the defaults. This #ModulemdDefaultsV1 object. The name of the string to retrieve the default profiles for. The name of the system intent for which to retrieve the profile defaults for this stream. System intents are deprecated and this argument will be ignored in the future. The name of the default stream for this module. This #ModulemdDefaultsV1 object. The name of the system intent whose default stream will be retrieved. If left NULL or the specified intent has no different default, it will return the generic default stream for this module. System intents are deprecated and this argument will be ignored in the future. A sorted #GStrv list of unique stream names for which default profiles have been assigned. This #ModulemdDefaultsV1 object. The name of the system intent whose stream profiles will be retrieved. If left NULL or the specified intent has no separate defaults for this module, it will return the generic stream profiles. System intents are deprecated and this argument will be ignored in the future. Removes this stream from the list of profiles entirely. It will not appear in the output document. This #ModulemdDefaultsV1 object. The name of the module stream from which to remove default profiles. The name of the system intent from which to remove the profile defaults for this stream. System intents are deprecated and calls with this non-NULL arugment will become void in the future. Set the default stream for this module. This #ModulemdDefaultsV1 object. The name of the default stream for this module. If NULL, it will remove the default stream. If non-NULL, this indicates the system intent to apply this default stream. If NULL, it will be added as common defaults. System intents are deprecated and calls with this non-NULL argument will become void in the future. Sets the default profiles for @stream_name to the empty set. When output to a file, it will appear as `stream_name: []`. This #ModulemdDefaultsV1 object. The name of the module stream for which to empty default profiles. The name of the system intent from which to clear the profile defaults for this stream. System intents are deprecated and calls with this non-NULL argument will become void in the future. Represents an error handling mdversion. Represents an unset mdversion. Represents v1 of the #ModulemdDefaults metadata format. Represents the highest-supported version of the #ModulemdDefaults metadata format. A newly-allocated #ModulemdDependencies object. This object must be freed with g_object_unref(). Add a single stream of a module that is required to build another dependent module. The matrix of streams and module names will be calculated by the build-system. If the provided module name is already present, the streams will be added (with deduplication). This #ModulemdDependencies object. The name of the module to depend on. The name of the module stream to depend on. Adds a module and its stream that is required at runtime by a dependent module. The matrix of streams and module names will be calculated by the build-system. If the listed provided module name is already present, the streams will be added (with deduplication). This #ModulemdDependencies object. The name of the module to depend on. The name of the module stream to depend on. Remove all buildtime dependencies from this #ModulemdDependencies object. This #ModulemdDependencies object. Remove all runtime dependencies from this #ModulemdDependencies object. This #ModulemdDependencies object. Create a copy of this #ModulemdDependencies object. The copied #ModulemdDependencies object. This #ModulemdDependencies object. Check if @self_1 and @self_2 are equal objects. TRUE, if the're equal. FALSE, otherwise. A #ModulemdDependencies object. A #ModulemdDependencies object. An ordered #GStrv list of module names of build-time dependencies. This #ModulemdDependencies object. An ordered #GStrv list of module streams associated with the specified module that are required at build-time. This #ModulemdDependencies object. The name of the module. An ordered #GStrv list of module names of run-time dependencies. This #ModulemdDependencies object. An ordered #GStrv list of module streams associated with the specified module that are required at run-time. This #ModulemdDependencies object. The name of the module. Adds a module and inserts an empty list for it as buildtime dependency. This #ModulemdDependencies object. The name of the module to add dependencies on. Adds a module and inserts an empty list for it as runtime dependency. This #ModulemdDependencies object. The name of the module to add dependencies on. Represents an error encountered while upgrading the metadata version of a module stream or module defaults. Represents an error encountered while validating module metadata. Represents an error encountered when attempting to access a file. Represents an error indicating that no streams matched when searching for a specific module stream. Represents an error indicating that multiple streams matched when searching for a specific module stream. Could not detect the mime type of a file for automatic detection of compression format. The requested function is not implemented on this platform, likely due to needing a newer version of a dependency library. The object is missing some data necessary for proper operation. Use #ModulemdError instead. Represents an error encountered while upgrading the metadata version of a module stream or module defaults. Represents an error encountered while validating module metadata. Represents an error encountered when attempting to access a file. Represents an error indicating that no streams matched when searching for a specific module stream. Since: 2.2 Represents an error indicating that multiple streams matched when searching for a specific module stream. Since: 2.2 Could not detect the mime type of a file for automatic detection of compression format. Since: 2.8 The requested function is not implemented on this platform, likely due to needing a newer version of a dependency library. Since: 2.8 The ModuleStream v3 specification defines the maximum lenth of the context field. The #ModulemdPackagerV3 default module metadata license. Iterates through all #ModulemdModuleStream entries in this #ModulemdModule and removes any XMD sections that are present. This is generally done to trim down the metadata to only the portions that are useful to the package manager. This #ModulemdModule object. A deep copy of this #ModulemdModule object. This #ModulemdModule object. A list of all available stream objects associated with this module. There may be multiple streams with the same name and different version and context. The order of items in this list is not guaranteed. This #ModulemdModule object. The defaults of this module or NULL if none. This #ModulemdModule object. The module name. This #ModulemdModule object. The newest active obsoletes attached to this module with specified stream and context (when eol_date is not set or it already occured the obsoletes is active). If no context is passed it matches obsoletes without context. This #ModulemdModule object. The stream to look up obsoletes for. The stream context to look up obsoletes for. A list of all obsoletes attached to this module. These are pointers to the internal memory objects and must not be modified or freed. This #ModulemdModule object. Use modulemd_module_get_stream_by_NSVCA() instead. The requested stream object or NULL if no match was found. This #ModulemdModule object. The name of the stream to retrieve. The version of the stream to retrieve. The context of the stream to retrieve. The requested stream object. NULL and sets @error appropriately if the provided information is not sufficient to return exactly one #ModulemdModuleStream result. This #ModulemdModule object. The name of the stream to retrieve. The version of the stream to retrieve. If set to zero, the version is not included in the search. The context of the stream to retrieve. If NULL, the context is not included in the search. The processor architecture of the stream to retrieve. If NULL, the architecture is not included in the search. An ordered #GStrv list of stream names in this module. This #ModulemdModule object. A list of all available stream objects associated with a particular stream name, sorted highest to lowest by the version. The same version may have more than one associated context. This #ModulemdModule object. The name of the stream to retrieve. The set of translations attached to streams. This #ModulemdModule object. The stream to look up translations for. Remove one or more #ModulemdModuleStream objects from this #ModulemdModule that match the provided parameters. This #ModulemdModule object. The name of the stream to remove. The version of the stream to remove. If set to zero, matches all versions. The context of the stream to remove. If NULL, matches all stream contexts. The processor architecture of the stream to remove. If NULL, matches all architectures. The list of stream objects matching the requested parameters. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by stream name, then by version (highest to lowest), then by context and finally by architecture. This #ModulemdModule object. The name of the stream to retrieve. The version of the stream to retrieve. If set to zero, the version is not included in the search. The context of the stream to retrieve. If NULL, the context is not included in the search. The processor architecture of the stream to retrieve. If NULL, the architecture is not included in the search. All arguments to this method will be compared using [fnmatch(3)](https://www.mankier.com/3/fnmatch). The list of stream objects matching all of the requested parameters. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture. This #ModulemdModule object. The name of the stream to retrieve. If NULL, will search all streams. The version of the stream to retrieve. If NULL, will search all versions. The context of the stream to retrieve. If NULL, will search all contexts. The processor architecture of the stream to retrieve. If NULL, the architecture is not included in the search. An array of #ModulemdModuleStream objects whose NSVCA string matches the provided pattern. This function cannot fail, but may return an array of zero entries if the pattern did not match any streams. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture. This #ModulemdModule object. A [glob](https://www.mankier.com/3/glob) pattern to match against the NSVCA strings of the #ModulemdModuleStream objects in this module. If NULL, this will match all NSVCAs. TRUE if validation passed, FALSE and sets @error if failed. This #ModulemdModule object. A newly-allocated #ModulemdModuleIndex object. TRUE if the #ModulemdDefaults was added successfully. If the defaults already existed in the index, it will be replaced by the new one. On failure, returns FALSE and sets @error appropriately. This #ModulemdModuleIndex object. The #ModulemdDefaults object to add to the index. Add a #ModulemdModuleStream to the #ModulemdModuleIndex. While being added, the #ModulemdModuleStream will be upgraded to %MD_MODULESTREAM_VERSION_LATEST to ensure that merges done with #ModulemdModuleIndexMerger will always occur between streams of the same version. If this upgrade cannot be performed, the function will return @error set appropriately. TRUE if the #ModulemdModuleStream was added successfully. If the stream already existed in the index, it will be replaced by the new one. On failure, returns FALSE and sets @error appropriately. This #ModulemdModuleIndex object. The #ModulemdModuleStream to add to the index. The stream added must have a module name and stream name set on it or it will be rejected. TRUE if the #ModulemdObsoletes was added successfully. If the obsoletes already existed in the index, it will be replaced by the new one. On failure, returns FALSE and sets @error appropriately. This #ModulemdModuleIndex object. The #ModulemdObsoletes object to add to the index. TRUE if the #ModulemdTranslation was added successfully. If the translation already existed in the index, it will be replaced by the new one. On failure, returns FALSE and sets @error appropriately. This #ModulemdModuleIndex object. The #ModulemdTranslation object to add to the index. Iterates through all #ModulemdModuleStream entries in this #ModulemdModuleIndex and removes any XMD sections that are present. This is generally done to trim down the metadata to only the portions that are useful to the package manager. This #ModulemdModuleIndex object. TRUE if written successfully, FALSE and sets @error appropriately in the event of an error. This #ModulemdModuleIndex object. A #ModulemdWriteHandler The private data needed by the #ModulemdWriteHandler TRUE if written successfully, FALSE and sets @error appropriately in the event of an error. This #ModulemdModuleIndex object. A stream to write the module metadata and other related information to. A YAML representation of the index as a string. In the event of an error, sets @error appropriately and returns NULL. This #ModulemdModuleIndex object. Get a dictionary of all modules in the index that have a default stream. This function cannot fail, but may return an empty (non-NULL) #GHashTable. A #GHashTable with the module name as the key and the default stream as the value for all modules with a default stream in the index. Modules without a default stream will not appear in this table. This #ModulemdModuleIndex object. The name of the system intent whose default stream will be retrieved. If left NULL or the specified intent has no separate default, it will return the generic default stream for this module. System intents are deprecated and this argument will be ignored in the future. The metadata version of #ModulemdDefaults in use for this index. This #ModulemdModuleIndex object. The #ModulemdModule object matching the provided module name or NULL if the key was not present in the index. This #ModulemdModuleIndex object. The module name to look up in the index. An ordered list of string keys in this index. This #ModulemdModuleIndex object. The metadata version of #ModulemdModuleStream in use for this index. This #ModulemdModuleIndex object. Remove a module, including all of its streams, its defaults and its translations from a #ModulemdModuleIndex. TRUE if the module name was present in the index. FALSE if it was not. This #ModulemdModuleIndex object. The name of the module to remove from the index. All arguments to this method will be compared using [fnmatch(3)](https://www.mankier.com/3/fnmatch). The list of stream objects containing an RPM that matches the @nevra_pattern. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture. This #ModulemdModuleIndex object. A [glob](https://www.mankier.com/3/glob) pattern to match against the NEVRA strings of the rpm artifacts in the #ModulemdModuleStream objects in this module. All arguments to this method will be compared using [fnmatch(3)](https://www.mankier.com/3/fnmatch). The list of stream objects matching all of the requested parameters. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture. This #ModulemdModuleIndex object. The name of the module to retrieve. If NULL, will search all modules in the index. The name of the stream to retrieve. If NULL, will search all streams in a module. The version of the stream to retrieve. If NULL, will search all versions. The context of the stream to retrieve. If NULL, will search all contexts. The processor architecture of the stream to retrieve. If NULL, the architecture is not included in the search. The list of stream objects matching all of the requested parameters. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture. This #ModulemdModuleIndex object. A [glob](https://www.mankier.com/3/glob) pattern to match against the NSVCA strings of the #ModulemdModuleStream objects in this module. If NULL, this will match all NSVCAs. %TRUE if the update was successful. Returns %FALSE and sets @failures appropriately if any of the YAML subdocuments were invalid or sets @error if there was a fatal parse error. This #ModulemdModuleIndex object. A #ModulemdReadHandler The private data needed by the #ModulemdReadHandler Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. On output, an array containing any subdocuments (pointers to #ModulemdSubdocumentInfo) from the YAML file that failed to parse. On input, it must be a non-%NULL pointer. If that pointer points to %NULL, this call will allocate a new array (regardless of any failures) with an element destructor set to g_object_unref(). Otherwise, the pointed array is reused without emptying before adding the failed subdocuments. The caller is responsible for freeing the array. This function will open the directory at @path and iterate through it, adding any files with the suffix ".yaml" to @self. If @overrides_path is non-%NULL, it will also open any files with the suffix ".yaml" in that location and import them, overriding any conflicts with the existing defaults. Note: If you need detailed information about what failed and why, it is better to implement the directory traversal yourself and use the modulemd_module_index_update_from_file() function, as it will return the failures information. %TRUE if all ".yaml" files in the directory were imported successfully (this includes if no ".yaml" files were present). %FALSE if one or more files could not be read successfully and sets @error appropriately. This #ModulemdModuleIndex object. The path to a directory containing defaults documents. Whether the parser should return failure if it encounters an unknown mapping key or a conflict in module default streams. If non-%NULL, the path to a directory containing defaults documents that should override those in @path. %TRUE if the update was successful. Returns %FALSE and sets @failures appropriately if any of the YAML subdocuments were invalid or sets @error if there was a fatal parse error. This #ModulemdModuleIndex object. A name of a YAML file containing the module metadata and other related information such as default streams. Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. On output, an array containing any subdocuments (pointers to #ModulemdSubdocumentInfo) from the YAML file that failed to parse. On input, it must be a non-%NULL pointer. If that pointer points to %NULL, this call will allocate a new array (regardless of any failures) with an element destructor set to g_object_unref(). Otherwise, the pointed array is reused without emptying before adding the failed subdocuments. The caller is responsible for freeing the array. %TRUE if the update was successful. Returns %FALSE and sets @failures appropriately if any of the YAML subdocuments were invalid or sets @error if there was a fatal parse error. This #ModulemdModuleIndex object. A YAML stream containing the module metadata and other related information such as default streams. Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. On output, an array containing any subdocuments (pointers to #ModulemdSubdocumentInfo) from the YAML file that failed to parse. On input, it must be a non-%NULL pointer. If that pointer points to %NULL, this call will allocate a new array (regardless of any failures) with an element destructor set to g_object_unref(). Otherwise, the pointed array is reused without emptying before adding the failed subdocuments. The caller is responsible for freeing the array. %TRUE if the update was successful. Returns %FALSE and sets @failures appropriately if any of the YAML subdocuments were invalid or sets @error if there was a fatal parse error. This #ModulemdModuleIndex object. A YAML string containing the module metadata and other related information such as default streams. Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. On output, an array containing any subdocuments (pointers to #ModulemdSubdocumentInfo) from the YAML file that failed to parse. On input, it must be a non-%NULL pointer. If that pointer points to %NULL, this call will allocate a new array (regardless of any failures) with an element destructor set to g_object_unref(). Otherwise, the pointed array is reused without emptying before adding the failed subdocuments. The caller is responsible for freeing the array. Upgrades all #ModulemdDefaults objects in this index to @mdversion if they are not already at that version. An attempt to downgrade or an attempt to upgrade beyond the latest supported version will report an error. In the case of a failure to upgrade a particular #ModulemdDefaults object of the index, an error will be reported and the index will be left in an undefined state. This #ModulemdModuleIndex object. The #ModulemdDefaults metadata version to upgrade to. Upgrades all #ModulemdModuleStream objects in this index to @mdversion if they are not already at that version. This #ModulemdModuleIndex object. The #ModulemdModuleStream metadata version to upgrade to. A newly-allocated #ModulemdModuleIndexMerger object. Enqueues a #ModulemdModuleIndex representing the parsed metadata from a repository into this #ModulemdModuleIndexMerger for merging and deduplication of other repositories. Once all repositories have been added, call modulemd_module_index_merger_resolve() to perform the merge. This #ModulemdModuleIndexMerger object. A #ModulemdModuleIndex, usually constructed by reading the module metadata from a repository with modulemd_module_index_update_from_file(), modulemd_module_index_update_from_string(), or `modulemd_module_index_update_from_stream()`. This function take a reference on @index, so the caller must not modify it while the #ModulemdModuleIndexMerger is in use. 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 the #ModulemdModuleIndexMerger class for details on the merge logic. Acceptable values are in the range of 0-1000. Merges all added #ModulemdModuleIndex objects according to their priority. The logic of this merge is described in the Description of #ModulemdModuleIndexMerger. Once this function has been called, the internal state of the #ModulemdModuleIndexMerger is undefined. The only valid action on it after that point is g_object_unref(). This function is equivalent to calling modulemd_module_index_merger_resolve_ext() with `strict_default_streams=FALSE`. A newly-allocated #ModulemdModuleIndex object containing the merged results. If this function encounters an unresolvable merge conflict, it will return NULL and set @error appropriately. This #ModulemdModuleIndexMerger object. Merges all added #ModulemdModuleIndex objects according to their priority. The logic of this merge is described in the Description of #ModulemdModuleIndexMerger. Once this function has been called, the internal state of the #ModulemdModuleIndexMerger is undefined. The only valid action on it after that point is g_object_unref(). A newly-allocated #ModulemdModuleIndex object containing the merged results. If this function encounters an unresolvable merge conflict, it will return NULL and set @error appropriately. This #ModulemdModuleIndexMerger object. If TRUE, merging two #ModulemdDefaults with conflicting default streams will raise an error. If FALSE, the module will have its default stream blocked. A newly-allocated #ModulemdModuleStream object of the requested metadata version. The metadata version of #ModulemdModuleStream to create. The name of the module. The name of this stream. Optional. Create a #ModulemdModuleStream object from a YAML file. Note: This function also reads modulemd-packager v2 and v3 documents, which are transparently returned as #ModulemdModuleStream (V2) objects. However, if a modulemd-packager v3 document (#ModulemdPackagerV3) is encountered and it uses buildopts (#ModulemdBuildopts) in one or more build configurations, only the buildopts present in the first listed configuration (if any) will be applied to the returned #ModulemdModuleStreamV2 object. Use modulemd_read_packager_file() instead. A newly-allocated #ModulemdModuleStream object if the YAML file was valid and contained exactly one `document: modulemd` subdocument. NULL if the document fails validation or multiple documents are encountered and sets @error appropriately. See #ModulemdModuleIndex for functions to read in multiple-subdocument YAML. The path to a YAML document containing a module stream definition. Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. Create a #ModulemdModuleStream object from a YAML file. A newly-allocated #ModulemdModuleStream object if the YAML file was valid and contained exactly one `document: modulemd` subdocument. NULL if the document fails validation or multiple documents are encountered and sets NULL appropriately. See #ModulemdModuleIndex for functions to read in multiple-subdocument YAML. A YAML document as a FILE * containing a module stream definition. Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. Create a #ModulemdModuleStream object from a YAML string. Note: This function also reads modulemd-packager v2 and v3 documents, which are transparently returned as #ModulemdModuleStream (V2) objects. However, if a modulemd-packager v3 document (#ModulemdPackagerV3) is encountered and it uses buildopts (#ModulemdBuildopts) in one or more build configurations, only the buildopts present in the first listed configuration (if any) will be applied to the returned #ModulemdModuleStreamV2 object. Use modulemd_read_packager_string() instead. A newly-allocated #ModulemdModuleStream object if the YAML string was valid and contained exactly one `document: modulemd` subdocument. NULL if the document fails validation or multiple documents are encountered and sets @error appropriately. See #ModulemdModuleIndex for functions to read in multiple-subdocument YAML. A YAML document string containing a module stream definition. Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. TRUE if any of the #ModulemdDependencies objects associated with this module applies to the provided module name and stream in the build-time dependencies. This #ModulemdModuleStream object. A module name. The stream of the module. Copies a #ModulemdModuleStream, optionally assigning it a new stream name in the process. A newly-allocated #ModulemdModuleStream object that is a complete copy of @self, optionally with a new stream name. This #ModulemdModuleStream object. An optional new name for the module of the copied stream. An optional new name for the copied stream. TRUE if any of the #ModulemdDependencies objects associated with this module applies to the provided module name and stream in the runtime dependencies. This #ModulemdModuleStream object. A module name. The stream of the module. Checks if @self_1 and @self_2 are identical objects. TRUE, If both objects are equal. FALSE, otherwise. A #ModulemdModuleStream object. A #ModulemdModuleStream object. The metadata version of this #ModulemdModuleStream. This #ModulemdModuleStream object. Verifies that all stored values are internally consistent and that the module is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents. TRUE if the #ModulemdModuleStream passed validation. FALSE and sets @error appropriately if validation fails. This #ModulemdModuleStream object. TRUE if any of the #ModulemdDependencies objects associated with this module applies to the provided module name and stream in the build-time dependencies. This #ModulemdModuleStream object. A module name. The stream of the module. Copies a #ModulemdModuleStream, optionally assigning it a new stream name in the process. A newly-allocated #ModulemdModuleStream object that is a complete copy of @self, optionally with a new stream name. This #ModulemdModuleStream object. An optional new name for the module of the copied stream. An optional new name for the copied stream. TRUE if any of the #ModulemdDependencies objects associated with this module applies to the provided module name and stream in the runtime dependencies. This #ModulemdModuleStream object. A module name. The stream of the module. Checks if @self_1 and @self_2 are identical objects. TRUE, If both objects are equal. FALSE, otherwise. A #ModulemdModuleStream object. A #ModulemdModuleStream object. The NSVCA of this module stream. The returned format is described [here](https://docs.fedoraproject.org/en-US/modularity/architecture/consuming/naming-policy/#_forms). NULL if module name or stream stream is unknown. This #ModulemdModuleStream object. Module architecture object. Indicates to which processor architecture this #ModulemdModuleStream applies. This #ModulemdModuleStream object. Module context flag. The context flag serves to distinguish module builds with the same name, stream and version and plays an important role in automatic module stream name expansion. This #ModulemdModuleStream object. The metadata version of this #ModulemdModuleStream. This #ModulemdModuleStream object. The name of the module. This #ModulemdModuleStream object. Retrieves a representation of the module name, stream name, version and context of this #ModulemdModuleStream in the form `module_name:stream_name:version:context`. Note that this excludes the architecture of the module stream and as such is not guaranteed to be unique within a repository. The NSVC (name:stream:version[:context]) of this module stream. NULL if module name or stream stream is unknown. This #ModulemdModuleStream object. The name of this stream. This #ModulemdModuleStream object. The version of this #ModulemdModuleStream. This #ModulemdModuleStream object. This #ModulemdModuleStream object. Module architecture. Indicates to which processor architecture this #ModulemdModuleStream applies. This #ModulemdModuleStream object. Module context flag. The context flag serves to distinguish module builds with the same name, stream and version and plays an important role in automatic module stream name expansion. This #ModulemdModuleStream object. The version of this #ModulemdModuleStream. Return an upgraded copy of this object. Does not modify the original. Use modulemd_module_stream_upgrade_ext() instead. A newly-allocated #ModulemdModuleStream copy of this object upgraded to the requested version. Returns NULL and sets @error appropriately if the upgrade could not be completed automatically. This #ModulemdModuleStream object. The metadata version to upgrade to. If zero, upgrades to the highest-supported version. Does not modify the original #ModulemdModuleStream object, @from. A newly-allocated #ModulemdModule containing a copy of this object upgraded to the requested version, possibly with multiple streams. Returns NULL and sets @error appropriately if the upgrade could not be completed automatically. This #ModulemdModuleStream object. The metadata version to upgrade to. If zero, upgrades to the highest-supported version. Verifies that all stored values are internally consistent and that the module is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents. TRUE if the #ModulemdModuleStream passed validation. FALSE and sets @error appropriately if validation fails. This #ModulemdModuleStream object. A newly-allocated #ModulemdModuleStream object that is a complete copy of @self, optionally with a new stream name. This #ModulemdModuleStream object. An optional new name for the module of the copied stream. An optional new name for the copied stream. TRUE if the #ModulemdModuleStream passed validation. FALSE and sets @error appropriately if validation fails. This #ModulemdModuleStream object. The metadata version of this #ModulemdModuleStream. This #ModulemdModuleStream object. TRUE if any of the #ModulemdDependencies objects associated with this module applies to the provided module name and stream in the runtime dependencies. This #ModulemdModuleStream object. A module name. The stream of the module. TRUE if any of the #ModulemdDependencies objects associated with this module applies to the provided module name and stream in the build-time dependencies. This #ModulemdModuleStream object. A module name. The stream of the module. TRUE, If both objects are equal. FALSE, otherwise. A #ModulemdModuleStream object. A #ModulemdModuleStream object. A newly-allocated #ModulemdModuleStreamV1 object, with the specified module and stream names, if provided. The name of this module. The name of this module stream. Add a build-time dependency for this module. This #ModulemdModuleStreamV1 object. The name of the module to depend on. The name of the module stream to depend on. Add a component definition to the module. This #ModulemdModuleStreamV1 object. A #ModulemdComponent to be added to this module stream. This #ModulemdModuleStreamV1 object. A license under which one or more of the components of this module stream are distributed. This #ModulemdModuleStreamV1 object. A license under which this module stream is distributed. Adds a profile definition to this module stream. This #ModulemdModuleStreamV1 object. A #ModulemdProfile for this module stream. This #ModulemdModuleStreamV1 object. The name of a binary RPM present in this module that is considered stable public API. This #ModulemdModuleStreamV1 object. The NEVR of a binary RPM present in this module stream. This #ModulemdModuleStreamV1 object. The name of a binary RPM to filter out of this module stream. Add a runtime dependency for this module. This #ModulemdModuleStreamV1 object. The name of the module to depend on. The name of the module stream to depend on. Adds a servicelevel definition to this module stream. This #ModulemdModuleStreamV1 object. A #ModulemdServiceLevel for this module stream. Remove all buildtime dependencies for this module. This #ModulemdModuleStreamV1 object. Remove all content licenses. This #ModulemdModuleStreamV1 object. Remove all module components from this module stream. This #ModulemdModuleStreamV1 object. Remove all module licenses. This #ModulemdModuleStreamV1 object. Remove all profiles from this module stream. This #ModulemdModuleStreamV1 object. Remove all RPMs from the list of stable public API. This #ModulemdModuleStreamV1 object. Remove all RPM NEVRs from the list of artifacts. This #ModulemdModuleStreamV1 object. Remove all RPM components from this module stream. This #ModulemdModuleStreamV1 object. Remove all RPMs from the filter list. This #ModulemdModuleStreamV1 object. Remove all runtime dependencies for this module. This #ModulemdModuleStreamV1 object. Remove all servicelevels from this module stream. This #ModulemdModuleStreamV1 object. The module artifact architecture. This #ModulemdModuleStreamV1 object. The build options for this module's components. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of module names that this module depends on at build-time. This #ModulemdModuleStreamV1 object. The name of the stream matching this module name in the build-time dependencies. This #ModulemdModuleStreamV1 object. The name of the module this module depends on. The module community website address. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of licenses under which one or more components of this module stream are released. This #ModulemdModuleStreamV1 object. The module description, translated to the requested locale if available. Translation information is managed by the #ModulemdTranslation and #ModulemdTranslationEntry objects. This #ModulemdModuleStreamV1 object. The name of the locale to use when translating the string. If NULL, it will determine the locale with a system call to `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the untranslated string, they should pass `"C"` for the locale. The module documentation website address. This #ModulemdModuleStreamV1 object. Compatibility function with early iterations of modulemd v1. This function is a wrapper for `modulemd_module_stream_v1_get_servicelevel("rawhide")`. Use modulemd_module_stream_v1_get_servicelevel() instead. The end-of-life date for the "rawhide" service level. This #ModulemdModuleStreamV1 object. The module component matching @component_name if it exists, else NULL. This #ModulemdModuleStreamV1 object. The name of the component to retrieve. An ordered #GStrv list of module component names included in this stream. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of licenses under which this module stream is released. This #ModulemdModuleStreamV1 object. The requested profile definition if present in the module stream. NULL otherwise. This #ModulemdModuleStreamV1 object. The name of a profile to retrieve. An ordered #GStrv list of profile names associated with this module stream. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of binary RPM names that forms the public API of this module stream. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of RPM NEVRs are included in this module stream. This #ModulemdModuleStreamV1 object. The RPM component matching @component_name if it exists, else NULL. This #ModulemdModuleStreamV1 object. The name of the component to retrieve. An ordered #GStrv list of RPM component names included in this stream. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of binary RPM names that are filtered out of this module stream. This #ModulemdModuleStreamV1 object. An ordered #GStrv list of module names that this module depends on at runtime. This #ModulemdModuleStreamV1 object. The requested servicelevel definition if present in the module stream. NULL otherwise. This #ModulemdModuleStreamV1 object. The name of a servicelevel to retrieve. An ordered #GStrv list of servicelevel names associated with this module stream. This #ModulemdModuleStreamV1 object. The module summary, translated to the requested locale if available. Translation information is managed by the #ModulemdTranslation and #ModulemdTranslationEntry objects. This #ModulemdModuleStreamV1 object. The name of the locale to use when translating the string. If NULL, it will determine the locale with a system call to `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the untranslated string, they should pass `"C"` for the locale. The module bug tracker website address. This #ModulemdModuleStreamV1 object. The extensible metadata block as a #GVariant. This #ModulemdModuleStreamV1 object. Remove a build-time dependency for this module. This #ModulemdModuleStreamV1 object. The name of the module to be removed. This #ModulemdModuleStreamV1 object. A license to remove from the list. Has no effect if the license is not present. Remove a component from this module stream. This #ModulemdModuleStreamV1 object. The name of the component to remove from the module stream. This #ModulemdModuleStreamV1 object. A license to remove from the list. Has no effect if the license is not present. This #ModulemdModuleStreamV1 object. A binary RPM name to remove from the list of stable public API. This #ModulemdModuleStreamV1 object. An RPM NEVR to remove from the list of artifacts. Remove a component from this module stream. This #ModulemdModuleStreamV1 object. The name of the component to remove from the module stream. This #ModulemdModuleStreamV1 object. A binary RPM name to remove from the filter list. Remove a runtime dependency for this module. This #ModulemdModuleStreamV1 object. The name of the module to be removed. Set the module artifact architecture. This #ModulemdModuleStreamV1 object. The module artifact architecture. Set build options for this module's components. This #ModulemdModuleStreamV1 object. A #ModulemdBuildopts object describing build options that apply globally to components in this module. Set the module community website address. This #ModulemdModuleStreamV1 object. The upstream community website for this module. Set the module description. This #ModulemdModuleStreamV1 object. The untranslated description of this module. Set the module documentation website address. This #ModulemdModuleStreamV1 object. The upstream documentation website for this module. Comptibility function with early iterations of modulemd v1. This function is a wrapper for `modulemd_module_stream_v1_add_servicelevel("rawhide", eol)`. Use modulemd_module_stream_v1_add_servicelevel() instead. This #ModulemdModuleStreamV1 object. The end-of-life date for the "rawhide" service level. Set the module summary. This #ModulemdModuleStreamV1 object. The untranslated summary of this module. Set the module bug tracker website address. This #ModulemdModuleStreamV1 object. The upstream bug tracker website for this module. Sets the eXtensible MetaData (XMD) for this module. XMD is arbitrary YAML data that will be set and returned as-is (with the exception that the ordering of mapping keys is not defined). Useful for carrying private data. This function assumes ownership of the XMD #GVariant and thus should not be freed by the caller. This #ModulemdModuleStreamV1 object. A #GVariant representing arbitrary YAML. A newly-allocated #ModulemdModuleStreamV2 object, with the specified module and stream names, if provided. The name of this module. The name of this module stream. Add a component definition to the module. This #ModulemdModuleStreamV2 object. A #ModulemdComponent to be added to this module stream. This #ModulemdModuleStreamV2 object. A license under which one or more of the components of this module stream are distributed. Add a binary package name to a list of demodularized packages. This #ModulemdModuleStreamV2 object. A name of a binary RPM package to become non-modular. Add a #ModulemdDependencies object to the list of dependencies for this module stream. This #ModulemdModuleStreamV2 object. A #ModulemdDependencies object to add to the list for this module stream. This #ModulemdModuleStreamV2 object. A license under which this module stream is distributed. Adds a profile definition to this module stream. This #ModulemdModuleStreamV2 object. A #ModulemdProfile for this module stream. This #ModulemdModuleStreamV2 object. The name of a binary RPM present in this module that is considered stable public API. This #ModulemdModuleStreamV2 object. The NEVR of a binary RPM present in this module stream. This #ModulemdModuleStreamV2 object. The name of a binary RPM to filter out of this module stream. Adds a servicelevel definition to this module stream. This #ModulemdModuleStreamV2 object. A #ModulemdServiceLevel for this module stream. Remove all content licenses. This #ModulemdModuleStreamV2 object. Remove all RPM packages from a demodularized list of the object. This #ModulemdModuleStreamV2 object. Empties the list of dependencies for this #ModulemdModuleStream. This #ModulemdModuleStreamV2 object. Remove all module components from this module stream. This #ModulemdModuleStreamV2 object. Remove all module licenses. This #ModulemdModuleStreamV2 object. Remove all profiles from this module stream. This #ModulemdModuleStreamV1 object. Remove all RPMs from the list of stable public API. This #ModulemdModuleStreamV2 object. Remove all NPM NEVRs from the list of artifacts. This #ModulemdModuleStreamV2 object. Remove all RPM components from this module stream. This #ModulemdModuleStreamV2 object. Remove all RPMs from the filter list. This #ModulemdModuleStreamV2 object. Remove all servicelevels from this module stream. This #ModulemdModuleStreamV2 object. Removes all XMD data from this #ModulemdModuleStreamV2 This #ModulemdModuleStreamV2 object. The module artifact architecture. This #ModulemdModuleStreamV2 object. The build options for this module's components. This #ModulemdModuleStreamV2 object. The module community website address. This #ModulemdModuleStreamV2 object. An ordered #GStrv list of licenses under which one or more components of this module stream are released. This #ModulemdModuleStreamV2 object. An ordered #GStrv list of binary RPM package names that became non-modular. This #ModulemdModuleStreamV2 object. Return the list of #ModulemdDependencies objects as a #GPtrArray. A list of all #ModulemdDependencies objects associated with this module stream. This #ModulemdModuleStreamV2 object. The module description, translated to the requested locale if available. Translation information is managed by the #ModulemdTranslation and #ModulemdTranslationEntry objects. This #ModulemdModuleStreamV2 object. The name of the locale to use when translating the string. If NULL, it will determine the locale with a system call to `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the untranslated string, they should pass `"C"` for the locale. The module documentation website address. This #ModulemdModuleStreamV2 object. The module component matching @component_name if it exists, else NULL. This #ModulemdModuleStreamV2 object. The name of the component to retrieve. An ordered #GStrv list of module component names included in this stream. This #ModulemdModuleStreamV2 object. An ordered #GStrv list of licenses under which this module stream is released. This #ModulemdModuleStreamV2 object. The #ModulemdObsoletes information associated with this object. If the associated obsoletes has reset attribute set, this function doesn't return it. From outside obsoletes with reset looks like there is no obsoletes set for this stream. Every obsoletes (even with reset) can be accessed from the streams module. This #ModulemdModuleStreamV2 object. The requested profile definition if present in the module stream. NULL otherwise. This #ModulemdModuleStreamV2 object. The name of a profile to retrieve. An ordered #GStrv list of profile names associated with this module stream. This #ModulemdModuleStreamV2 object. An ordered #GStrv list of binary RPM names that form the public API of this module stream. This #ModulemdModuleStreamV2 object. The #ModulemdRpmMapEntry object associated with the provided @checksum generated by the provided @digest. This #ModulemdModuleStreamV2 object. A string representing the digest algorithm used to generate the @checksum. An RPM artifact checksum. An ordered #GStrv list of RPM NEVRs that are included in this module stream. This #ModulemdModuleStreamV2 object. The RPM component matching @component_name if it exists, else NULL. This #ModulemdModuleStreamV2 object. The name of the component to retrieve. An ordered #GStrv list of RPM component names included in this stream. This #ModulemdModuleStreamV2 object. An ordered #GStrv list of binary RPM names that are filtered out of this module stream. This #ModulemdModuleStreamV2 object. The requested servicelevel definition if present in the module stream. NULL otherwise. This #ModulemdModuleStreamV2 object. The name of a servicelevel to retrieve. An ordered #GStrv list of servicelevel names associated with this module stream. This #ModulemdModuleStreamV2 object. The module summary, translated to the requested locale if available. Translation information is managed by the #ModulemdTranslation and #ModulemdTranslationEntry objects. This #ModulemdModuleStreamV2 object. The name of the locale to use when translating the string. If NULL, it will determine the locale with a system call to `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the untranslated string, they should pass `"C"` for the locale. The module bug tracker website address. This #ModulemdModuleStreamV2 object. The extensible metadata block as a #GVariant. This #ModulemdModuleStreamV2 object. Whether the `context` attribute should be treated as static. This #ModulemdModuleStreamV2 object. This #ModulemdModuleStreamV2 object. A license to remove from the list. Has no effect if the license is not present. Remove a binary package name from a list of demodularized packages. This #ModulemdModuleStreamV2 object. A binary RPM name to remove from a demodularized list. Removes all entries matching @deps from the array of #ModulemdDependencies objects. This #ModulemdModuleStreamV2 object. A #ModulemdDependencies object to remove from the list for this module stream. Remove a component from this module stream. This #ModulemdModuleStreamV2 object. The name of the component to remove from the module stream. This #ModulemdModuleStreamV2 object. A license to remove from the list. Has no effect if the license is not present. This #ModulemdModuleStreamV2 object. A binary RPM name to remove from the list of stable public API. This #ModulemdModuleStreamV2 object. An RPM NEVR to remove from the list of artifacts. Remove a component from this module stream. This #ModulemdModuleStreamV2 object. The name of the component to remove from the module stream. This #ModulemdModuleStreamV2 object. A binary RPM name to remove from the filter list. The list of #ModulemdProfile objects whose name matched @profile_pattern. This function cannot fail, but it may return a zero-length list if no matches were found. The returned profiles will be sorted alphabetically by profile name. This #ModulemdModuleStreamV2 object. A globbing pattern to locate one or more profiles in this #ModulemdModuleStreamV2 object. The names will be compared using [fnmatch(3)](https://www.mankier.com/3/fnmatch). Set the module artifact architecture. This #ModulemdModuleStreamV2 object. The module artifact architecture. Set build options for this module's components. This #ModulemdModuleStreamV2 object. A #ModulemdBuildopts object describing build options that apply globally to components in this module. Set the module community website address. This #ModulemdModuleStreamV2 object. The upstream community website for this module. Set the module description. This #ModulemdModuleStreamV2 object. The untranslated description of this module. Set the module documentation website address. This #ModulemdModuleStreamV2 object. The upstream documentation website for this module. This #ModulemdModuleStreamV2 object. The RPM map entry to save to the stream. A string representing the digest algorithm used to generate the @checksum. An RPM artifact checksum. Marks this #ModulemdModuleStreamV2 to indicate to dependency solvers that they must treat the `context` attribute as informative. This #ModulemdModuleStreamV2 object. Set the module summary. This #ModulemdModuleStreamV2 object. The untranslated summary of this module. Set the module bug tracker website address. This #ModulemdModuleStreamV2 object. The upstream bug tracker website for this module. Sets the eXtensible MetaData (XMD) for this module. XMD is arbitrary YAML data that will be set and returned as-is (with the exception that the ordering of mapping keys is not defined). Useful for carrying private data. This function assumes ownership of the XMD #GVariant and thus should not be freed by the caller. This #ModulemdModuleStreamV2 object. A #GVariant representing arbitrary YAML. Marks this #ModulemdModuleStreamV2 to indicate to dependency solvers that they must ignore the `context` attribute as a uniqueness element. This #ModulemdModuleStreamV2 object. Represents an error handling module stream version. Represents an unset module stream version. Represents v1 of the #ModulemdModuleStream metadata format. Represents v2 of the #ModulemdModuleStream metadata format. Represents the highest-supported version of the #ModulemdModuleStream metadata format. A newly-allocated #ModulemdObsoletes object. This object must be freed with g_object_unref(). The metadata version of this #ModulemdObsoletes. The last modified time represented as a 64-bit integer (such as 201807011200). The name of the module to which this obsoletes applies. The name of the module stream to which this obsoletes applies. A string describing the change, reason, etc. Create a copy of this #ModulemdObsoletes object. The copied #ModulemdObsoletes object. This #ModulemdObsoletes object. A date represented as a 64-bit integer (such as 201807011200). This #ModulemdObsoletes object. The message associated with this #ModulemdObsoletes object This #ModulemdObsoletes object. The last modified time of this #ModulemdObsoletes object represented as a 64-bit integer (such as 201807011200). This #ModulemdObsoletes object. The context name to which this #ModulemdObsoletes object applies. This #ModulemdObsoletes object. The module name of obsoleting stream. This #ModulemdObsoletes object. The module stream of obsoleting stream. This #ModulemdObsoletes object. Whether this #ModulemdObsoletes object cancels/resets all previously specified obsoletes. This #ModulemdObsoletes object. If this #ModulemdObsoletes object has eol_date set and the date has not occured yet it returns false otherwise it returns true. (When eol_date is not set or it already occured the obsoletes is active.) This #ModulemdObsoletes object. This #ModulemdObsoletes object. The end-of-life date for this stream. If set to zero, the stream is EOLed immediately. This #ModulemdObsoletes object. The last modified time represented as a 64-bit integer (such as 201807011200). This #ModulemdObsoletes object. The name of the module context to which this obsoletes applies. Sets both obsoleted by module name and stream because having one without the other is invalid. This #ModulemdObsoletes object. The module name of obsoleting stream. The module stream of obsoleting stream. Sets the reset attribute on #ModulemdObsoletes object. With this boolean attribute set the obsoletes resets (cancels out) all previously specified obsoletes. This #ModulemdObsoletes object. Whether to reset/cancel all previously specified obsoletes. This method ensures that the obsoletes is internally consistent for usage or dumping to YAML. It will be run implicitly prior to emitting YAML. This is not a complete linter, merely a sanity check that the values are not impossible. This #ModulemdObsoletes object. Represents an error handling mdversion. Represents an unset mdversion. Represents v1 of the #ModulemdObsoletes metadata format. Represents the highest-supported version of the #ModulemdObsoletes metadata format. A newly-allocated #ModulemdPackagerV3 object. This object must be freed with g_object_unref(). This #ModulemdPackagerV3 object. A #ModulemdBuildConfig to include. Add a component definition to the module. This #ModulemdPackagerV3 object. A #ModulemdComponent to be added to this module stream. Add a binary package name to a list of demodularized packages. This #ModulemdPackagerV3 object. A name of a binary RPM package to become non-modular. This #ModulemdPackagerV3 object. A license under which this module stream is distributed. Adds a #ModulemdProfile to this #ModulemdPackagerV3 object. This #ModulemdPackagerV3 object. The new #ModulemdProfile to add. This #ModulemdPackagerV3 object. The name of a binary RPM present in this module that is considered stable public API. This #ModulemdPackagerV3 object. The name of a binary RPM to filter out of this module stream. Remove all added #ModulemdBuildConfig objects from @self This #ModulemdPackagerV3 object. Remove all RPM packages from a demodularized list of the object. This #ModulemdPackagerV3 object. Remove all module components from this module stream. This #ModulemdPackagerV3 object. Remove all module licenses from @self This #ModulemdPackagerV3 object. Removes all #ModulemdProfile objects from this #ModulemdPackagerV3 object. This #ModulemdPackagerV3 object. Remove all RPMs from the list of stable public API. This #ModulemdPackagerV3 object. Remove all RPM components from this module stream. This #ModulemdPackagerV3 object. Remove all RPMs from the filter list. This #ModulemdPackagerV3 object. A newly-allocated #ModulemdModuleIndex object containing a set of one or more #ModulemdModuleStreamV2 objects and possibly a #ModulemdDefaults object corresponding to the #ModulemdPackagerV3 object @self. NULL if there was an error doing the mapping and sets @error appropriately. One of the errors is missing a module name or a stream name if a default profile is present. This #ModulemdPackagerV3 object. A newly-allocated deep-copy of this #ModulemdPackagerV3 object. This object must be freed with g_object_unref(). This #ModulemdPackagerV3 object. A #ModulemdBuildConfig with the provided @context or NULL if it was not present. This #ModulemdPackagerV3 object. The context of the #ModulemdBuildConfig to retrieve from @self. A list of contexts associated with the build configurations. This #ModulemdPackagerV3 object. The module community website address. This #ModulemdPackagerV3 object. An ordered #GStrv list of binary RPM package names that became non-modular. This #ModulemdPackagerV3 object. The long description of the module. This #ModulemdPackagerV3 object. The module documentation website address. This #ModulemdPackagerV3 object. The metadata version of this #ModulemdPackagerV3. This #ModulemdPackagerV3 object. The module component matching @component_name if it exists, else NULL. This #ModulemdPackagerV3 object. The name of the component to retrieve. An ordered #GStrv list of module component names included in this stream. This #ModulemdPackagerV3 object. A #GStrv of module licenses associated with this module stream. This #ModulemdPackagerV3 object. The module name. This #ModulemdPackagerV3 object. The requested profile definition if present in the #ModulemdPackagerV3 object. NULL otherwise. This #ModulemdPackagerV3 object. The name of a profile to retrieve. An ordered #GStrv list of profile names associated with this #ModulemdPackagerV3 object. This #ModulemdPackagerV3 object. An ordered #GStrv list of binary RPM names that form the public API of this module stream. This #ModulemdPackagerV3 object. The RPM component matching @component_name if it exists, else NULL. This #ModulemdPackagerV3 object. The name of the component to retrieve. An ordered #GStrv list of RPM component names included in this stream. This #ModulemdPackagerV3 object. An ordered #GStrv list of binary RPM names that are filtered out of this module stream. This #ModulemdPackagerV3 object. The module stream name. This #ModulemdPackagerV3 object. The short description of the module. This #ModulemdPackagerV3 object. The module bug tracker website address. This #ModulemdPackagerV3 object. The extensible metadata block as a #GVariant. This #ModulemdPackagerV3 object. Remove a binary package name from a list of demodularized packages. This #ModulemdPackagerV3 object. A binary RPM package name to remove from a demodularized list. Remove a component from this module stream. This #ModulemdPackagerV3 object. The name of the component to remove from the module stream. This #ModulemdPackagerV3 object. A license to remove from the list. Has no effect if the license is not present. This #ModulemdPackagerV3 object. A binary RPM name to remove from the list of stable public API. Remove a component from this module stream. This #ModulemdPackagerV3 object. The name of the component to remove from the module stream. This #ModulemdPackagerV3 object. A binary RPM name to remove from the filter list. Any existing demodularized binary RPM package names associated with module stream @self are removed and replaced by @set. This #ModulemdPackagerV3 object. A #GHashTable set of names of binary RPM packages to demodularize. Any existing API RPMs associated with module stream @self are removed and replaced by @set. This #ModulemdPackagerV3 object. A #GHashTable set of binary RPMs present in this module stream that is considered stable public API. Any existing filtered binary RPM names associated with module stream @self are removed and replaced by @set. This #ModulemdPackagerV3 object. A #GHashTable set of names of binary RPMs to filter out of this module stream. Set the module community website address. This #ModulemdPackagerV3 object. The upstream community website for this module. Sets the module's long description. This #ModulemdPackagerV3 object. A complete description of the module. Set the module documentation website address. This #ModulemdPackagerV3 object. The upstream documentation website for this module. Sets the module name that this #ModulemdPackagerV3 object references. This #ModulemdPackagerV3 object. The name of the module. Sets the stream name that this #ModulemdPackagerV3 object references. This #ModulemdPackagerV3 object. The name of the module. Sets the module's short description. This #ModulemdPackagerV3 object. A short description of the module. Set the module bug tracker website address. This #ModulemdPackagerV3 object. The upstream bug tracker website for this module. Sets the eXtensible MetaData (XMD) for this module. XMD is arbitrary YAML data that will be set and returned as-is (with the exception that the ordering of mapping keys is not defined). Useful for carrying private data. This function assumes ownership of the XMD #GVariant and thus should not be freed by the caller. This #ModulemdPackagerV3 object. A #GVariant representing arbitrary YAML. Represents an error handling module stream version. Represents an unset module stream version. Represents v2 of the ModulePackager metadata format. Since: 2.11 Represents v3 of the ModulePackager metadata format. Since: 2.11 Represents the highest-supported version of the ModulePackager metadata format. A newly-allocated #ModulemdProfile object. This object must be freed with g_object_unref(). The name of this profile. This #ModulemdProfile object. The name of a binary RPM that should be installed when this profile is selected for installation. Remove all RPMs from this profile. This #ModulemdProfile object. Create a copy of this #ModulemdProfile object. The copied #ModulemdProfile object. This #ModulemdProfile object. TRUE, if all elements of @self_1 and @self_2 are equal. FALSE, otherwise. A #ModulemdProfile object. A #ModulemdProfile object. The description of this profile translated into the language specified by the locale if it is available, otherwise it returns the C.UTF-8 original. Translation information is managed by the #ModulemdTranslation and #ModulemdTranslationEntry objects. This #ModulemdProfile object. The name of the locale to use when translating the string. If NULL, it will determine the locale with a system call to `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the untranslated string, they should pass `"C"` for the locale. The name of this profile. This #ModulemdProfile object. An ordered #GStrv list of binary RPMS that would be installed when this profile is selected for installation. This #ModulemdProfile object. TRUE if this profile is a default for the associated stream. FALSE otherwise. This #ModulemdProfile object. This #ModulemdProfile object. The name of a binary RPM to remove from this profile. Calling this function indicates that this profile should be considered one of the default profiles for the associated stream. This #ModulemdProfile object. This #ModulemdProfile object. The untranslated description of this profile. Calling this function indicates that this profile should not be considered one of the default profiles for this stream. This is the normal state of a #ModulemdProfile and thus this function is usually unnecessary. It has no effect if @self is already non-default. This #ModulemdProfile object. The prototype of a read handler. The read handler is called when the parser needs to read more bytes from the source. The handler should write not more than @size bytes to the @buffer. The number of written bytes should be set to the @size_read variable. This handler is identical to a [yaml_read_handler_t in yaml.h header of libyaml](https://github.com/yaml/libyaml/blob/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h#L988) but is included here to avoid depending on yaml.h in modulemd headers. On success, the handler must return 1. If the handler failed, the returned value must be 0. On EOF, the handler must set the @size_read to 0 and return 1. A private pointer to the data being read. The buffer to write the data from the source. The size of the buffer. The actual number of bytes read from the source. Create a new rpm-map entry. This will contain the decomposed NEVRA of an RPM artifact. A newly-allocated #ModulemdRpmMapEntry object with the provided values. The name of the package. The epoch of the package. The version of the package. The release string of the package. The processor architecture of the package. A deep copy of this #ModulemdRpmMapEntry object. This #ModulemdRpmMapEntry object. TRUE if the two entries contain equivalent data. FALSE if they differ. A #ModulemdRpmMapEntry object. Another #ModulemdRpmMapEntry object. The package architecture of this RPM. This #ModulemdRpmMapEntry object. The package epoch of this RPM. This #ModulemdRpmMapEntry object. The package name of this RPM. This #ModulemdRpmMapEntry object. A newly-allocated string containing the complete N-E:V-R.A constructed from the component parts. NULL if any field is missing. This #ModulemdRpmMapEntry object. The package release of this RPM. This #ModulemdRpmMapEntry object. The package version of this RPM. This #ModulemdRpmMapEntry object. This #ModulemdRpmMapEntry object. The package architecture of this RPM. This #ModulemdRpmMapEntry object. The package epoch of this RPM. This #ModulemdRpmMapEntry object. The package name of this RPM. This #ModulemdRpmMapEntry object. The package release string of this RPM. This #ModulemdRpmMapEntry object. The package version of this RPM. This #ModulemdRpmMapEntry object. A newly-allocated #ModulemdServiceLevel object. This object must be freed with g_object_unref(). The name of the service level. Create a copy of this #ModulemdServiceLevel object. The copied #ModulemdServiceLevel object. This #ModulemdServiceLevel object. TRUE if both the dates are either NULL or valid, FALSE otherwise. A #ModulemdServiceLevel object. A #ModulemdServiceLevel object. The end date of the service level as a #GDate. This #ModulemdServiceLevel object. The end date of the service level as a string of the form "YYYY-MM-DD" or NULL if the date is unset or invalid. This #ModulemdServiceLevel object. Get the name of this service level. The name of this service level. This is a pointer to the internal memory location and must not be freed. This #ModulemdServiceLevel object. Remove the EOL from this Service Level. This #ModulemdServiceLevel object. Sets the end date of the service level. If the #GDate passed in is invalid or NULL, the EOL will be unset. This #ModulemdServiceLevel object. The date this service level ends. This #ModulemdServiceLevel object. The year this service level ends. The month this service level ends. The day of the month this service level ends. A #GError containing an error code and message about why this subdocument failed parsing. This #ModulemdSubdocumentInfo object. The associated YAML subdocument. This #ModulemdSubdocumentInfo object. A newly-allocated #ModulemdTranslation object. This object must be freed with g_object_unref(). The metadata version of this #ModulemdTranslation. The name of the module to which these translations apply. The name of the module stream to which these translations apply. The last modified time represented as a 64-bit integer (such as 201807011200). Create a copy of this #ModulemdTranslation object. The copied #ModulemdTranslation object. This #ModulemdTranslation object. An ordered #GStrv list of locales known to this #ModulemdTranslation. This #ModulemdTranslation object. The translation entry for the requested locale, or NULL if the locale was unknown. This #ModulemdTranslation object. The locale of the translation to retrieve. This #ModulemdTranslation object. The last modified time represented as a 64-bit integer (such as 201807011200). This #ModulemdTranslation object. A set of translations of this module stream for a particular locale. This method ensures that the translation is internally consistent for usage or dumping to YAML. It will be run implicitly prior to emitting YAML. This is not a complete linter, merely a sanity check that the values are not impossible. This #ModulemdTranslation object. A newly-allocated #ModulemdTranslationEntry object. This object must be freed with g_object_unref(). The locale for this translation entry. It must correspond to the format specified by libc locale names. Create a copy of this #ModulemdTranslationEntry object. The copied #ModulemdTranslationEntry object. This #ModulemdTranslationEntry object. Get the description of this translation entry. The description of this module stream translated into the language specified by locale. This #ModulemdTranslationEntry object. Get the locale of this translation entry. The locale of this translation entry. This is a pointer to the internal memory location and must not be freed. This #ModulemdTranslationEntry object. Get a list of profiles that have descriptions. An ordered #GStrv list of profiles for which descriptions have been translated for this locale. This #ModulemdTranslationEntry object. Get the summary of this translation entry. The summary of this module stream translated into the language specified by locale. This #ModulemdTranslationEntry object. This #ModulemdTranslationEntry object. The description of this module stream translated into the language specified by locale. Adds a profile name translation. This #ModulemdTranslationEntry object. The name of the profile. The translated description of the profile. This #ModulemdTranslationEntry object. The summary of this module translated appropriately for this locale. The prototype of a write handler. The write handler is called when the emitter needs to flush the accumulated characters to the output. The handler should write @size bytes of the @buffer to the output. This handler is identical to a [yaml_write_handler_t in yaml.h header of libyaml](https://github.com/yaml/libyaml/blob/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h#L1478) but is included here to avoid depending on yaml.h in modulemd headers. On success, the handler must return 1. If the handler failed, the returned value must be 0. A private pointer that includes the data source. The buffer with bytes to be written. The size of the buffer. Represents an error encountered while opening a YAML file. Represents an internal programming error encountered while parsing a YAML document. Represents an error indicating that unexpected data or some other parsing error that violates the YAML spec was encountered while parsing a YAML document. Represents an error indicating invalid data violating the modulemd YAML spec was encountered while parsing a YAML document. Represents an error encountered while writing a YAML file. Represents an error indicating that required elements are missing while parsing a YAML document. Represents an error indicating that a YAML output event could not be initialized. Represents a data inconsistency error encountered while parsing a YAML document. Use #ModulemdYamlError instead. Represents an error encountered while opening a YAML file. Represents an internal programming error encountered while parsing a YAML document. Represents an error indicating that unexpected data or some other parsing error was encountered while parsing a YAML document. Represents an error indicating invalid data was encountered while parsing a YAML document. Represents an error encountered while writing a YAML file. Represents an error indicating that required elements are missing while parsing a YAML document. Represents an error indicating that a YAML output event could not be initialized. Represents a data inconsistency error encountered while parsing a YAML document. The #ModulemdCompressionTypeEnum value corresponding to the provided string if available or #MODULEMD_COMPRESSION_TYPE_UNKNOWN_COMPRESSION if the string does not match a known type. The name of the compression type. Valid options are: "gz", "gzip", "bz2", "bzip2", "xz", "zck", and "zstd". A #GQuark used to identify an error in the general modulemd domain. A string describing the version of libmodulemd. This is a convenience function that is a wrapper around modulemd_module_index_new() and modulemd_module_index_update_from_file() with `strict=False`. It will return the imported module metadata if all subdocuments are parseable and valid. If any part of the document is unreadable or fails validation, it will return NULL and set @error appropriately. If you need more detail about which parts of the document failed, use the lower-level functions. A newly-allocated #ModulemdModuleIndex object initialized with the content from @yaml_file. Returns NULL and sets @error if the file is not completely valid. A YAML file containing the module metadata and other related information such as default streams. This is a convenience function that is a wrapper around modulemd_module_index_new() and modulemd_module_index_update_from_string() with `strict=False`. It will return the imported module metadata if all subdocuments are parseable and valid. If any part of the document is unreadable or fails validation, it will return NULL and set @error appropriately. If you need more detail about which parts of the document failed, use the lower-level functions. A newly-allocated #ModulemdModuleIndex object initialized with the content from @yaml_string. Returns NULL and sets @error if the metadata is not completely valid. A YAML string containing the module metadata and other related information such as default streams. Remove one or more #ModulemdModuleStream objects from this #ModulemdModule that match the provided stream name. This #ModulemdModule object. The name of the stream to remove. # Working with repodata (DNF use-case) The libmodulemd API provides a number of convenience tools for interacting with repodata (that is, streams of YAML that contains information on multiple streams, default data and translations). The documentation will use two repositories, called "fedora" and "updates" for demonstrative purposes. It will assume that the content of the YAML module metadata from those two repositories have been loaded into string variables `fedora_yaml` and `updates_yaml`, respectively. Tools such as DNF that are consuming data from a repository should always set `strict=False`, so that it can safely handle minor, backwards-compatible changes to the modulemd format. First step is to load the metadata from these two repositories into #ModulemdModuleIndex objects. This is done as follows: In C: |[<!-- language="C" --> ModulemdModuleIndex *fedora_index = modulemd_module_index_new (); gboolean ret = modulemd_module_index_update_from_string ( fedora_index, fedora_yaml, FALSE, &failures, &error); ModulemdModuleIndex *updates_index = modulemd_module_index_new (); gboolean ret2 = modulemd_module_index_update_from_string ( updates_index, updates_yaml, FALSE, &failures, &error); ]| In Python: |[<!-- language="Python" --> fedora_index = Modulemd.ModuleIndex.new() ret, failures = fedora_index.update_from_string(fedora_yaml, False) updates_index = Modulemd.ModuleIndex.new() ret, failures = updates_index.update_from_string(updates_yaml, False) ]| The @failures are a list of subdocuments in the YAML that failed parsing, along with the reason they failed. Hence, by checking the return value of @failures we will know if the YAML parsing was successful or not. Since it doesn't really make sense to view the contents from separate repositories in isolation (in most cases), the next step is to merge the two indexes into a combined one: In C: |[<!-- language="C" --> ModulemdModuleIndexMerger *merger = modulemd_module_index_merger_new (); modulemd_module_index_merger_associate_index (merger, fedora_index, 0); modulemd_module_index_merger_associate_index (merger, updates_index, 0); ModulemdModuleIndex *merged_index = modulemd_module_index_merger_resolve (merger, &error); ]| In Python: |[<!-- language="Python" --> merger = Modulemd.ModuleIndexMerger.new() merger.associate_index(fedora_index, 0) merger.associate_index(updates_index, 0) merged_index = merger.resolve() ]| At this point, you now have either a complete view of the merged repodata, or else have received an error describing why the merge was unable to complete successfully. Additionally, it should be noted that the combined metadata in any #ModulemdModuleIndex will have all of its component parts upgraded to match the highest version of those objects seen. So for example if the repodata has a mix of v1 and v2 #ModulemdModuleStream objects, the index will contain only v2 objects (with the v1 objects automatically upgraded internally). Now, we can start operating on the retrieved data. This guide will give only a brief overview of the most common operations. See the API specification for a full list of information that can be retrieved. ## Discover the default stream for a particular module. In C: |[<!-- language="C" --> ModulemdModule *module = modulemd_module_index_get_module (merged_index, "modulename"); ModulemdDefaults *defaults = modulemd_module_get_defaults (module); if (defaults) { printf ("Default stream for modulename is %s\n", modulemd_defaults_v1_get_default_stream ( MODULEMD_DEFAULTS_V1 (defaults), NULL)); } ]| In Python: |[<!-- language="Python" --> module = merged_index.get_module("modulename") defaults = module.get_defaults() print("Default stream for modulename is %s" % defaults.get_default_stream()) ]| ## Get the list of RPMs defining the public API for a particular module NSVCA First, query the #ModulemdModuleIndex for the module with a given name. In C: |[<!-- language="C" --> ModulemdModule *module = modulemd_module_index_get_module (merged_index, "modulename"); ]| In Python: |[<!-- language="Python" --> module = merged_index.get_module("modulename") ]| Then, query the #ModulemdModule for the #ModulemdModuleStream associated with the provided NSVCA (name-stream-version-context-architecture identifier). In C: |[<!-- language="C" --> ModulemdModuleStream *stream = modulemd_module_get_stream_by_NSVCA ( module, "modulestream", 0, "deadbeef", "coolarch", &error); ]| In Python: |[<!-- language="Python" --> stream = module.get_stream_by_NSVCA("modulestream", 0, "deadbeef", "coolarch") ]| Lastly, read the RPM API from the #ModulemdModuleStream. Here, `api_list` is a list of strings containing package names. In C: |[<!-- language="C" --> GStrv api_list = modulemd_module_stream_v2_get_rpm_api_as_strv ( MODULEMD_MODULE_STREAM_V2 (stream)); ]| In Python: |[<!-- language="Python" --> api_list = stream.get_rpm_api() ]| Also note that in addition to accessor API methods, many objects also have properties that can be accessed directly. In C: |[<!-- language="C" --> printf ("Documentation for module stream is at %s\n", modulemd_module_stream_v2_get_documentation ( MODULEMD_MODULE_STREAM_V2 (stream))); g_autofree gchar *doc; g_object_get (MODULEMD_MODULE_STREAM_V2 (stream), "documentation", &doc, NULL); printf ("Documentation for module stream is at %s\n", doc); ]| In Python: |[<!-- language="Python" --> print("Documentation for module stream is at %s" % stream.get_documentation()) print("Documentation for module stream is at %s" % stream.props.documentation) ]| ## Retrieve the modular runtime dependencies for a particular module NSVCA In C: |[<!-- language="C" --> ModulemdModule *module = modulemd_module_index_get_module (merged_index, "modulename"); ModulemdModuleStream *stream = modulemd_module_get_stream_by_NSVCA ( module, "modulestream", 0, "deadbeef", "coolarch", &error); GPtrArray *deps_list = modulemd_module_stream_v2_get_dependencies ( MODULEMD_MODULE_STREAM_V2 (stream)); for (gint i = 0; i < deps_list->len; i++) { GStrv depmodules_list = modulemd_dependencies_get_runtime_modules_as_strv ( g_ptr_array_index (deps_list, i)); for (gint j = 0; j < g_strv_length (depmodules_list); j++) { GStrv depstreams_list = modulemd_dependencies_get_runtime_streams_as_strv ( g_ptr_array_index (deps_list, i), depmodules_list[j]); for (gint k = 0; k < g_strv_length (depstreams_list); k++) { // do stuff with depmodules_list[j], depstreams_list[k] } } } ]| In Python: |[<!-- language="Python" --> module = merged_index.get_module("modulename") stream = module.get_stream_by_NSVCA("modulestream", 0, "deadbeef", "coolarch") deps_list = stream.get_dependencies() for dep in deps_list: depmodules_list = dep.get_runtime_modules() for depmod in depmodules_list: depstream_list = dep.get_runtime_streams(depmod) for depstream in depstream_list: # do stuff with depmod, depstream ]| # Working with a single module stream (Packager/MBS use-case) One limitation of the #ModulemdModuleIndex format is that it requires that all module streams loaded into it have both a name and a stream name. This however is not possible when dealing with streams such as a packager would be using (since the build-system auto-generates the module name and stream name from the git repository information. In this case, we need to work with a single module stream document at a time. For this, we will use the #ModulemdModuleStream interface. This example will assume that the module name and stream name have already been determined from the repodata and that they are stored in string variables named `module_name` and `stream_name`, respectively. In Python: |[<!-- language="Python" --> stream = Modulemd.ModuleStream.read_file( "/path/to/module_name.yaml", True, module_name, stream_name ) v2_stream = stream.upgrade(Modulemd.ModuleStreamVersionEnum.TWO) v2_stream.validate() ]| In the example above, we upgraded the stream to v2, in case we were reading from v1 metadata. This will allow us to avoid having to manage multiple code-paths and support only the latest we understand. After that, it calls validate() to ensure that the content that was read in was valid both syntactically and referentially. Also available is `Modulemd.ModuleStreamVersionEnum.LATEST` which will always represent the highest-supported version of the #ModulemdModuleStream metadata format. This may change at any time. This object provides an interface to the complete metadata read from a repository or manually added to this object. NOTE: When adding or updating this object from YAML, all objects imported will be automatically upgraded to match the highest version of that object that is seen. This means that if the repository has a mix of #ModulemdModuleStreamV1 and #ModulemdModuleStreamV2 objects, the index will contain only #ModulemdModuleStreamV2. You can check the versions the index upgraded to with the modulemd_module_index_get_stream_mdversion() and modulemd_module_index_get_defaults_mdversion(). If your application would prefer to always work with a particular stream or defaults version (such as to avoid extra branching logic), the modulemd_module_index_upgrade_streams() and modulemd_module_index_upgrade_defaults() functions can be used to force the contents of the index to upgrade to those versions. Interacting with #ModulemdModuleIndex is relatively simple. A common Python example for working with Fedora repodata might be (assuming the metadata has already been read into strings): |[<!-- language="Python" --> fedora_repo_index = Modulemd.ModuleIndex.new() fedora_repo_index.update_from_string(fedora_modulemd, True) # Get the list of all module names in the index module_names = fedora_repo_index.get_module_names() # Retrieve information about a particular module from the index module = fedora_repo_index.get_module('module_name') ]| See the #ModulemdModule documentation for details on retrieving information about specific modules, including how to get #ModulemdDefaults information and retrieve individual #ModulemdModuleStream objects. See the #ModulemdModuleIndexMerger documentation for details on merging #ModulemdModuleIndex objects from separate repositories together. ModuleIndexMerger is used to resolve merges between multiple repository metadata sources, possibly with varying priorities. It is expected to be used as follows (python example) by tools such as `yum`: |[<!-- language="Python" --> merger = Modulemd.ModuleIndexMerger.new() merger.associate_index(fedora_repo_index, 0) merger.associate_index(updates_repo_index, 0) merger.associate_index(updates_testing_repo_index, 0) merged_index = merger.resolve() ]| In the above code, merged_index will be a complete, merged view of the metadata from all of the added #ModulemdModuleIndex instances. When merging module streams, entries will be deduplicated based on whether they share the same module name, stream name, version number, and context. If the repository configuration is broken and there exists two #ModulemdModuleStream entries that have different content for the same NSVCA, the behavior is undefined. Merging #ModulemdDefaults entries behaves as follows (note that this behavior has changed slightly as of 2.8.1): - Any module defaults object that is provided by a single #ModulemdModuleIndex will be the defaults object in the resulting merged #ModulemdModuleIndex. - If the #ModulemdModuleIndex inputs have different priorities (not common), then the defaults from the highest priority #ModulemdModuleIndex will be used and the others entirely discarded. The `modified` value will not be considered at all. (Priority is intended for providing a total override, including an on-disk configuration). - If the repos have the same priority (such as "fedora" and "updates" in the Fedora Project) and `modified` value, the entries will be merged as follows for default streams: - If both #ModulemdModuleIndex objects specify the same default stream for the module, that one will be used. - If either #ModulemdModuleIndex specifies a default stream for the module and the other does not, the provided one will be used. - If both #ModulemdModuleIndex objects specify different default streams and have different `modified` values, the default stream from the #ModulemdDefaults object with the higher `modified` value will be used. - If both #ModulemdModuleIndex objects specify different default streams and have the same `modified` value, the merge will unset the default stream and leave no default stream in the resulting merged #ModulemdModuleIndex. This behavior can be controlled by using modulemd_module_index_merger_resolve_ext() and setting `strict_default_streams` to #TRUE. In that case, an error will be returned if conflicting default streams have been provided. - and for profile defaults: - If both #ModulemdModuleIndex objects specify a set of default profiles for a particular module and stream and the sets are equivalent, use that set. - If one #ModulemdModuleIndex object specifies a set of default profiles for a module and stream and the other does not, use the provided set. - If both #ModulemdModuleIndex objects specify a set of default profiles for a stream, each are providing a different set and the `modified` value differs, the set from the object with the higher `modified` value will be used. - If both #ModulemdModuleIndex objects specify a set of default profiles for a stream, each are providing a different set and the `modified` value is the same, this is an unresolvable merge conflict and the merge resolution will fail and return an error. - Intents behave in exactly the same manner as described for the top-level defaults, except that they merge beneath each intent name. Intents are deprecated. Merging #ModulemdTranslations entries behaves as follows: - For each translated summary, description and profile description, compare the `modified` value of the Translation document matching this module name and stream. Whichever has the higher value will be used. Any translation containing the empty string will be interpreted as removing the translation. Subsequent processing of a higher modified value may restore it. Merging #ModulemdObsoletes entries with identical module, stream, context and modified values behaves as follows (when accessed through module): - Any obsoletes object that is provided by a single #ModulemdModuleIndex will be the obsoletes object in the resulting merged #ModulemdModuleIndex. - If the #ModulemdModuleIndex inputs have different priorities (not common), then the obsoletes from the highest priority #ModulemdModuleIndex will be used and the others entirely discarded. (Priority is intended for providing a total override, including an on-disk configuration). - If the repos have the same priority (such as "fedora" and "updates" in the Fedora Project) the behaviour is undefined. @MODULEMD_TYPE_MODULE_STREAM_V2, @MODULEMD_TYPE_PACKAGER_V3, or @G_TYPE_INVALID. Returns the matching GObject through the @object parameter. If the return value is @G_TYPE_INVALID, returns the reason as @error. A path to a YAML file containing a packager document. (transfer full): A newly allocated #ModulemdModuleStreamV2 or #ModulemdPackagerV3 object initialized with the content from @yaml_path. @MODULEMD_TYPE_MODULE_STREAM_V2, @MODULEMD_TYPE_PACKAGER_V3, or @G_TYPE_INVALID. Returns the matching GObject through the @object parameter. If the return value is @G_TYPE_INVALID, returns the reason as @error. A path to a YAML file containing a packager document. (transfer full): A newly allocated #ModulemdModuleStreamV2 or #ModulemdPackagerV3 object initialized with the content from @yaml_path. An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. @MODULEMD_TYPE_MODULE_STREAM_V2, @MODULEMD_TYPE_PACKAGER_V3, or @G_TYPE_INVALID. Returns the matching GObject through the @object parameter. If the return value is @G_TYPE_INVALID, returns the reason as @error. A YAML string containing a packager document. (transfer full): A newly allocated #ModulemdModuleStreamV2 or #ModulemdPackagerV3 object initialized with the content from @yaml_string. @MODULEMD_TYPE_MODULE_STREAM_V2, @MODULEMD_TYPE_PACKAGER_V3, or @G_TYPE_INVALID. Returns the matching GObject through the @object parameter. If the return value is @G_TYPE_INVALID, returns the reason as @error. A YAML string containing a packager document. (transfer full): A newly allocated #ModulemdModuleStreamV2 or #ModulemdPackagerV3 object initialized with the content from @yaml_string. An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. A #GQuark used to identify an error in the modulemd yaml domain.