Modulemd.Profile

g GObject.Object GObject.Object Modulemd.Profile Modulemd.Profile GObject.Object->Modulemd.Profile

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name)

add_rpm (rpm)

clear_rpms ()

copy ()

equals (self_2)

get_description (locale)

get_name ()

get_rpms ()

is_default ()

remove_rpm (rpm)

set_default ()

set_description (description)

unset_default ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

name

str

r/w/co

The name of this profile.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Modulemd.Profile(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Modulemd.ProfileClass

classmethod new(name)
Parameters:

name (str) – The name of this profile.

Returns:

A newly-allocated Modulemd.Profile object. This object must be freed with GObject.Object.unref().

Return type:

Modulemd.Profile

New in version 2.0.

add_rpm(rpm)
Parameters:

rpm (str) – The name of a binary RPM that should be installed when this profile is selected for installation.

New in version 2.0.

clear_rpms()

Remove all RPMs from this profile.

New in version 2.5.

copy()
Returns:

The copied Modulemd.Profile object.

Return type:

Modulemd.Profile

Create a copy of this Modulemd.Profile object.

New in version 2.0.

equals(self_2)
Parameters:

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

Returns:

True, if all elements of self and self_2 are equal. False, otherwise.

Return type:

bool

New in version 2.2.

get_description(locale)
Parameters:

locale (str or None) – The name of the locale to use when translating the string. If None, 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.

Returns:

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 Modulemd.Translation and Modulemd.TranslationEntry objects.

Return type:

str

New in version 2.0.

get_name()
Returns:

The name of this profile.

Return type:

str

New in version 2.0.

get_rpms()
Returns:

An ordered #GStrv list of binary RPMS that would be installed when this profile is selected for installation.

Return type:

[str]

New in version 2.0.

is_default()
Returns:

True if this profile is a default for the associated stream. False otherwise.

Return type:

bool

New in version 2.10.

remove_rpm(rpm)
Parameters:

rpm (str) – The name of a binary RPM to remove from this profile.

New in version 2.0.

set_default()

Calling this function indicates that this profile should be considered one of the default profiles for the associated stream.

New in version 2.10.

set_description(description)
Parameters:

description (str or None) – The untranslated description of this profile.

New in version 2.0.

unset_default()

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 Modulemd.Profile and thus this function is usually unnecessary. It has no effect if self is already non-default.

New in version 2.10.

Property Details

Modulemd.Profile.props.name
Name:

name

Type:

str

Default Value:

'__PROFILE_NAME_UNSET__'

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of this profile.