Modulemd.BuildConfig

Modulemd.BuildConfig — Internal representation of a module build configuration

Stability Level

Private, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── ModulemdBuildConfig

Description

Functions

modulemd_build_config_new ()

ModulemdBuildConfig *
modulemd_build_config_new (void);

Initialize a new ModulemdBuildConfig representing a module build configuration.

Since: 2.10


modulemd_build_config_set_context ()

void
modulemd_build_config_set_context (ModulemdBuildConfig *self,
                                   const gchar *context);

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.

Parameters

self

This ModulemdBuildConfig object.

 

context

A string of up to ten alphanumeric characters.

 

Since: 2.10


modulemd_build_config_get_context ()

const gchar *
modulemd_build_config_get_context (ModulemdBuildConfig *self);

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.

Parameters

self

This ModulemdBuildConfig object.

 

Returns

The string representing the context that this build configuration produces.

[transfer none]

Since: 2.10


modulemd_build_config_set_platform ()

void
modulemd_build_config_set_platform (ModulemdBuildConfig *self,
                                    const gchar *platform);

Set the platform that this build configuration applies to.

Parameters

self

This ModulemdBuildConfig object.

 

platform

A string of up to ten alphanumeric characters.

 

Since: 2.10


modulemd_build_config_get_platform ()

const gchar *
modulemd_build_config_get_platform (ModulemdBuildConfig *self);

Get the platform that this build configuration applies to.

Parameters

self

This ModulemdBuildConfig object.

 

Returns

The string representing the platform that this build configuration applies to.

[transfer none]

Since: 2.10


modulemd_build_config_add_runtime_requirement ()

void
modulemd_build_config_add_runtime_requirement
                               (ModulemdBuildConfig *self,
                                const gchar *module_name,
                                const gchar *stream_name);

Add a build-time dependency for this module.

Parameters

self

This ModulemdBuildConfig object.

[in]

module_name

The name of the module to depend on.

[in]

stream_name

The name of the module stream to depend on.

[in]

Since: 2.10


modulemd_build_config_remove_runtime_requirement ()

void
modulemd_build_config_remove_runtime_requirement
                               (ModulemdBuildConfig *self,
                                const gchar *module_name);

Remove a run-time dependency for this module.

Parameters

self

This ModulemdBuildConfig object.

[in]

module_name

The name of the module to be removed.

[in]

Since: 2.10


modulemd_build_config_clear_runtime_requirements ()

void
modulemd_build_config_clear_runtime_requirements
                               (ModulemdBuildConfig *self);

Remove all run-time dependencies for this module.

Parameters

self

This ModulemdBuildConfig object.

[in]

Since: 2.10


modulemd_build_config_get_runtime_requirement_stream ()

const gchar *
modulemd_build_config_get_runtime_requirement_stream
                               (ModulemdBuildConfig *self,
                                const gchar *module_name);

Parameters

self

This ModulemdBuildConfig object.

[in]

module_name

The name of the module this module depends on.

[in]

Returns

The name of the stream matching this module name in the run-time dependencies.

[transfer none]

Since: 2.10


modulemd_build_config_get_runtime_modules_as_strv ()

GStrv
modulemd_build_config_get_runtime_modules_as_strv
                               (ModulemdBuildConfig *self);

Parameters

self

This ModulemdBuildConfig object.

[in]

Returns

An ordered GStrv list of module names that this module depends on at run-time.

[transfer full]

Since: 2.10


modulemd_build_config_add_buildtime_requirement ()

void
modulemd_build_config_add_buildtime_requirement
                               (ModulemdBuildConfig *self,
                                const gchar *module_name,
                                const gchar *stream_name);

Add a build-time dependency for this module.

Parameters

self

This ModulemdBuildConfig object.

[in]

module_name

The name of the module to depend on.

[in]

stream_name

The name of the module stream to depend on.

[in]

Since: 2.10


modulemd_build_config_remove_buildtime_requirement ()

void
modulemd_build_config_remove_buildtime_requirement
                               (ModulemdBuildConfig *self,
                                const gchar *module_name);

Remove a build-time dependency for this module.

Parameters

self

This ModulemdBuildConfig object.

[in]

module_name

The name of the module to be removed.

[in]

Since: 2.10


modulemd_build_config_clear_buildtime_requirements ()

void
modulemd_build_config_clear_buildtime_requirements
                               (ModulemdBuildConfig *self);

Remove all build-time dependencies for this module.

Parameters

self

This ModulemdBuildConfig object.

[in]

Since: 2.10


modulemd_build_config_get_buildtime_requirement_stream ()

const gchar *
modulemd_build_config_get_buildtime_requirement_stream
                               (ModulemdBuildConfig *self,
                                const gchar *module_name);

Parameters

self

This ModulemdBuildConfig object.

[in]

module_name

The name of the module this module depends on.

[in]

Returns

The name of the stream matching this module name in the build-time dependencies.

[transfer none]

Since: 2.10


modulemd_build_config_get_buildtime_modules_as_strv ()

GStrv
modulemd_build_config_get_buildtime_modules_as_strv
                               (ModulemdBuildConfig *self);

Parameters

self

This ModulemdBuildConfig object.

[in]

Returns

An ordered GStrv list of module names that this module depends on at build-time.

[transfer full]

Since: 2.10


modulemd_build_config_set_buildopts ()

void
modulemd_build_config_set_buildopts (ModulemdBuildConfig *self,
                                     ModulemdBuildopts *buildopts);

Set build options for this module's components.

Parameters

self

This ModulemdBuildConfig object.

[in]

buildopts

A ModulemdBuildopts object describing build options that apply globally to components in this module.

[in][transfer none]

Since: 2.10


modulemd_build_config_get_buildopts ()

ModulemdBuildopts *
modulemd_build_config_get_buildopts (ModulemdBuildConfig *self);

Parameters

self

This ModulemdBuildConfig object.

[in]

Returns

The build options for this module's components.

[transfer none]

Since: 2.10


modulemd_build_config_parse_yaml ()

ModulemdBuildConfig *
modulemd_build_config_parse_yaml (yaml_parser_t *parser,
                                  gboolean strict,
                                  GError **error);

Parameters

parser

A yaml_parser_t positioned at the start of a configuration entry of a ModulemdPackager v3 YAML document.

 

strict

Whether to ignore unknown keys in the YAML

 

error

A GError explaining any failure to complete the parsing.

[out]

Returns

A newly-constructed ModulemdBuildConfig object populated from the data in the provided YAML. Returns NULL and sets error appropriately if the document couldn't be parsed successfully or failed validation.

[transfer full]

Since: 2.10


modulemd_build_config_emit_yaml ()

gboolean
modulemd_build_config_emit_yaml (ModulemdBuildConfig *self,
                                 yaml_emitter_t *emitter,
                                 GError **error);

Parameters

self

This ModulemdBuildConfig object.

 

emitter

A libyaml emitter object positioned where a BuidConfig belongs in the YAML document.

[inout]

error

A GError that will return the reason for an emission or validation error.

[out]

Returns

TRUE if the BuildConfig was emitted successfully. FALSE and sets error appropriately if the YAML could not be emitted.

Since: 2.10


modulemd_build_config_validate ()

gboolean
modulemd_build_config_validate (ModulemdBuildConfig *buildconfig,
                                GError **error);

Determine if this ModulemdBuildConfig is valid according to the YAML specification.

Parameters

self

This ModulemdBuildConfig object.

[in]

error

A GError explaining any validation failure.

[out]

Returns

TRUE if validation passes. Returns FALSE and sets error appropriately on validation failure.

Since: 2.10


modulemd_build_config_copy ()

ModulemdBuildConfig *
modulemd_build_config_copy (ModulemdBuildConfig *self);

Parameters

self

This ModulemdBuildConfig object.

[in]

Returns

A deep copy of self .

[transfer full]

Since: 2.10


modulemd_build_config_equals ()

gboolean
modulemd_build_config_equals (ModulemdBuildConfig *self_1,
                              ModulemdBuildConfig *self_2);

Parameters

self_1

A pointer to a ModulemdBuildConfig object.

 

self_2

A pointer to a ModulemdBuildConfig object.

 

Returns

TRUE, if self_1 and self_2 are pointers to ModulemdBuildConfig objects containing equivalent data. FALSE, otherwise.

Since: 2.10

Types and Values

MODULEMD_TYPE_BUILD_CONFIG

#define MODULEMD_TYPE_BUILD_CONFIG (modulemd_build_config_get_type ())

ModulemdBuildConfig

typedef struct _ModulemdBuildConfig ModulemdBuildConfig;