Modulemd.Component

g GObject.Object GObject.Object Modulemd.Component Modulemd.Component GObject.Object->Modulemd.Component

Subclasses:

Modulemd.ComponentModule, Modulemd.ComponentRpm

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add_buildafter (key)

clear_buildafter ()

copy (key)

equals (self_2)

get_buildafter ()

get_buildonly ()

get_buildorder ()

get_key ()

get_name ()

get_rationale ()

set_buildonly (buildonly)

set_buildorder (buildorder)

set_name (name)

set_rationale (rationale)

validate ()

Virtual Methods

Inherited:

GObject.Object (7)

do_copy (key)

do_equals (self_2)

do_get_name ()

do_set_name (name)

do_validate ()

Properties

Name

Type

Flags

Short Description

buildonly

bool

r/w

Whether the artifacts produced by this component are intended only for building this module.

buildorder

int

r/w

The order this component should be built relative to others.

name

str

r/w/co

The name of the component. This is the real name of the component and may differ from the key used to associate this component with the ModuleStream.

rationale

str

r/w

A description of the reason this component is part of the module stream.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Modulemd.Component(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Modulemd.ComponentClass

add_buildafter(key)
Parameters:

key (str) – A key representing another component in the Modulemd.ModuleStream components map.

Add a build dependency of this component.

New in version 2.2.

clear_buildafter()

Remove all buildafter entries for this component.

New in version 2.5.

copy(key)
Parameters:

key (str or None) – An optional new key for the copied component which is used as the lookup key when this component is attached to a Modulemd.ModuleStream.

Returns:

A newly-allocated copy of self.

Return type:

Modulemd.Component

New in version 2.0.

equals(self_2)
Parameters:

self_2 (Modulemd.Component) – A Modulemd.Component object.

Returns:

True, if both the objects are equal. False, otherwise.

Return type:

bool

New in version 2.3.

get_buildafter()
Returns:

The set of component keys that this component depends upon.

Return type:

[str]

New in version 2.2.

get_buildonly()
Returns:

True if this component is used only for building this module.

Return type:

bool

New in version 2.2.

get_buildorder()
Returns:

The value of the buildorder.

Return type:

int

New in version 2.0.

get_key()
Returns:

The name of the key used to attach this component to a Modulemd.ModuleStream.

Return type:

str

New in version 2.2.

get_name()
Returns:

The name of the component. Note that this may be different from the key used to save this component to a Modulemd.ModuleStream. If you specifically need the key, use Modulemd.Component.get_key() instead.

Return type:

str

New in version 2.0.

get_rationale()
Returns:

The rationale.

Return type:

str

New in version 2.0.

set_buildonly(buildonly)
Parameters:

buildonly (bool) – 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.

New in version 2.2.

set_buildorder(buildorder)
Parameters:

buildorder (int) – The order this component should be built relative to others.

New in version 2.0.

set_name(name)
Parameters:

name (str or None) – The name of this component. Note that this is different from the key used to save this component to a Modulemd.ModuleStream. 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 Modulemd.ComponentRpm and has no effect on other Modulemd.Component types.

New in version 2.2.

set_rationale(rationale)
Parameters:

rationale (str or None) – The reason that this component is part of the stream.

New in version 2.0.

validate()
Raises:

GLib.Error

Returns:

True if the Modulemd.Component passed validation. False and sets error appropriately if validation fails.

Return type:

bool

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.

New in version 2.2.

do_copy(key) virtual
Parameters:

key (str or None) – An optional new key for the copied component which is used as the lookup key when this component is attached to a Modulemd.ModuleStream.

Returns:

A newly-allocated copy of self.

Return type:

Modulemd.Component

New in version 2.0.

do_equals(self_2) virtual
Parameters:

self_2 (Modulemd.Component) – A Modulemd.Component object.

Returns:

True, if both the objects are equal. False, otherwise.

Return type:

bool

New in version 2.3.

do_get_name() virtual
Returns:

The name of the component. Note that this may be different from the key used to save this component to a Modulemd.ModuleStream. If you specifically need the key, use Modulemd.Component.get_key() instead.

Return type:

str

New in version 2.0.

do_set_name(name) virtual
Parameters:

name (str or None) – The name of this component. Note that this is different from the key used to save this component to a Modulemd.ModuleStream. 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 Modulemd.ComponentRpm and has no effect on other Modulemd.Component types.

New in version 2.2.

do_validate() virtual
Returns:

True if the Modulemd.Component passed validation. False and sets error appropriately if validation fails.

Return type:

bool

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.

New in version 2.2.

Property Details

Modulemd.Component.props.buildonly
Name:

buildonly

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the artifacts produced by this component are intended only for building this module.

Modulemd.Component.props.buildorder
Name:

buildorder

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The order this component should be built relative to others.

Modulemd.Component.props.name
Name:

name

Type:

str

Default Value:

'__UNSET__'

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of the component. This is the real name of the component and may differ from the key used to associate this component with the ModuleStream.

Modulemd.Component.props.rationale
Name:

rationale

Type:

str

Default Value:

'__UNSET__'

Flags:

READABLE, WRITABLE

A description of the reason this component is part of the module stream.