Modulemd.ModuleStreamV2

g GObject.Object GObject.Object Modulemd.ModuleStream Modulemd.ModuleStream GObject.Object->Modulemd.ModuleStream Modulemd.ModuleStreamV2 Modulemd.ModuleStreamV2 Modulemd.ModuleStream->Modulemd.ModuleStreamV2

Subclasses:

None

Methods

Inherited:

Modulemd.ModuleStream (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (module_name, module_stream)

add_component (component)

add_content_license (license)

add_demodularized_rpm (rpm)

add_dependencies (deps)

add_module_license (license)

add_profile (profile)

add_rpm_api (rpm)

add_rpm_artifact (nevr)

add_rpm_filter (rpm)

add_servicelevel (servicelevel)

clear_content_licenses ()

clear_demodularized_rpms ()

clear_dependencies ()

clear_module_components ()

clear_module_licenses ()

clear_profiles ()

clear_rpm_api ()

clear_rpm_artifacts ()

clear_rpm_components ()

clear_rpm_filters ()

clear_servicelevels ()

clear_xmd ()

get_arch ()

get_buildopts ()

get_community ()

get_content_licenses ()

get_demodularized_rpms ()

get_dependencies ()

get_description (locale)

get_documentation ()

get_module_component (component_name)

get_module_component_names ()

get_module_licenses ()

get_obsoletes_resolved ()

get_profile (profile_name)

get_profile_names ()

get_rpm_api ()

get_rpm_artifact_map_entry (digest, checksum)

get_rpm_artifacts ()

get_rpm_component (component_name)

get_rpm_component_names ()

get_rpm_filters ()

get_servicelevel (servicelevel_name)

get_servicelevel_names ()

get_summary (locale)

get_tracker ()

get_xmd ()

is_static_context ()

remove_content_license (license)

remove_demodularized_rpm (rpm)

remove_dependencies (deps)

remove_module_component (component_name)

remove_module_license (license)

remove_rpm_api (rpm)

remove_rpm_artifact (nevr)

remove_rpm_component (component_name)

remove_rpm_filter (rpm)

search_profiles (profile_pattern)

set_arch (arch)

set_buildopts (buildopts)

set_community (community)

set_description (description)

set_documentation (documentation)

set_rpm_artifact_map_entry (entry, digest, checksum)

set_static_context ()

set_summary (summary)

set_tracker (tracker)

set_xmd (xmd)

unset_static_context ()

Virtual Methods

Inherited:

Modulemd.ModuleStream (6), GObject.Object (7)

Properties

Inherited:

Modulemd.ModuleStream (6)

Name

Type

Flags

Short Description

buildopts

Modulemd.Buildopts

r/w

Build options for module components

community

str

r/w/c

The website address of the upstream community for this module

documentation

str

r/w/c

The website address of the upstream documentation for this module

static-context

bool

r/w/c

Whether the context is static

tracker

str

r/w/c

The website address of the upstream bug tracker for this module

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Modulemd.ModuleStreamV2(**kwargs)
Bases:

Modulemd.ModuleStream

Abstract:

No

Structure:

Modulemd.ModuleStreamV2Class

classmethod new(module_name, module_stream)
Parameters:
  • module_name (str or None) – The name of this module.

  • module_stream (str or None) – The name of this module stream.

Returns:

A newly-allocated Modulemd.ModuleStreamV2 object, with the specified module and stream names, if provided.

Return type:

Modulemd.ModuleStreamV2

New in version 2.0.

add_component(component)
Parameters:

component (Modulemd.Component) – A Modulemd.Component to be added to this module stream.

Add a component definition to the module.

New in version 2.0.

add_content_license(license)
Parameters:

license (str) – A license under which one or more of the components of this module stream are distributed.

New in version 2.0.

add_demodularized_rpm(rpm)
Parameters:

rpm (str) – A name of a binary RPM package to become non-modular.

Add a binary package name to a list of demodularized packages.

New in version 2.13.

add_dependencies(deps)
Parameters:

deps (Modulemd.Dependencies) – A Modulemd.Dependencies object to add to the list for this module stream.

Add a Modulemd.Dependencies object to the list of dependencies for this module stream.

New in version 2.0.

add_module_license(license)
Parameters:

license (str) – A license under which this module stream is distributed.

New in version 2.0.

add_profile(profile)
Parameters:

profile (Modulemd.Profile) – A Modulemd.Profile for this module stream.

Adds a profile definition to this module stream.

New in version 2.0.

add_rpm_api(rpm)
Parameters:

rpm (str) – The name of a binary RPM present in this module that is considered stable public API.

New in version 2.0.

add_rpm_artifact(nevr)
Parameters:

nevr (str) – The NEVR of a binary RPM present in this module stream.

New in version 2.0.

add_rpm_filter(rpm)
Parameters:

rpm (str) – The name of a binary RPM to filter out of this module stream.

New in version 2.0.

add_servicelevel(servicelevel)
Parameters:

servicelevel (Modulemd.ServiceLevel) – A Modulemd.ServiceLevel for this module stream.

Adds a servicelevel definition to this module stream.

New in version 2.0.

clear_content_licenses()

Remove all content licenses.

New in version 2.5.

clear_demodularized_rpms()

Remove all RPM packages from a demodularized list of the object.

New in version 2.13.

clear_dependencies()

Empties the list of dependencies for this Modulemd.ModuleStream.

New in version 2.4.

clear_module_components()

Remove all module components from this module stream.

clear_module_licenses()

Remove all module licenses.

New in version 2.5.

clear_profiles()

Remove all profiles from this module stream.

New in version 2.0.

clear_rpm_api()

Remove all RPMs from the list of stable public API.

New in version 2.5.

clear_rpm_artifacts()

Remove all NPM NEVRs from the list of artifacts.

New in version 2.5.

clear_rpm_components()

Remove all RPM components from this module stream.

clear_rpm_filters()

Remove all RPMs from the filter list.

New in version 2.5.

clear_servicelevels()

Remove all servicelevels from this module stream.

New in version 2.0.

clear_xmd()

Removes all XMD data from this Modulemd.ModuleStreamV2

New in version 2.14.

get_arch()
Returns:

The module artifact architecture.

Return type:

str

New in version 2.0.

get_buildopts()
Returns:

The build options for this module’s components.

Return type:

Modulemd.Buildopts

New in version 2.0.

get_community()
Returns:

The module community website address.

Return type:

str

New in version 2.0.

get_content_licenses()
Returns:

An ordered #GStrv list of licenses under which one or more components of this module stream are released.

Return type:

[str]

New in version 2.0.

get_demodularized_rpms()
Returns:

An ordered #GStrv list of binary RPM package names that became non-modular.

Return type:

[str]

New in version 2.13.

get_dependencies()
Returns:

A list of all Modulemd.Dependencies objects associated with this module stream.

Return type:

[Modulemd.Dependencies]

Return the list of Modulemd.Dependencies objects as a GLib.PtrArray.

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 module description, translated to the requested locale if available. Translation information is managed by the Modulemd.Translation and Modulemd.TranslationEntry objects.

Return type:

str

New in version 2.0.

get_documentation()
Returns:

The module documentation website address.

Return type:

str

New in version 2.0.

get_module_component(component_name)
Parameters:

component_name (str) – The name of the component to retrieve.

Returns:

The module component matching component_name if it exists, else None.

Return type:

Modulemd.ComponentModule

New in version 2.0.

get_module_component_names()
Returns:

An ordered #GStrv list of module component names included in this stream.

Return type:

[str]

New in version 2.0.

get_module_licenses()
Returns:

An ordered #GStrv list of licenses under which this module stream is released.

Return type:

[str]

New in version 2.0.

get_obsoletes_resolved()
Returns:

The Modulemd.Obsoletes 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.

Return type:

Modulemd.Obsoletes

New in version 2.10.

get_profile(profile_name)
Parameters:

profile_name (str) – The name of a profile to retrieve.

Returns:

The requested profile definition if present in the module stream. None otherwise.

Return type:

Modulemd.Profile

New in version 2.0.

get_profile_names()
Returns:

An ordered #GStrv list of profile names associated with this module stream.

Return type:

[str]

New in version 2.0.

get_rpm_api()
Returns:

An ordered #GStrv list of binary RPM names that form the public API of this module stream.

Return type:

[str]

New in version 2.0.

get_rpm_artifact_map_entry(digest, checksum)
Parameters:
  • digest (str) – A string representing the digest algorithm used to generate the checksum.

  • checksum (str) – An RPM artifact checksum.

Returns:

The Modulemd.RpmMapEntry object associated with the provided checksum generated by the provided digest.

Return type:

Modulemd.RpmMapEntry

New in version 2.2.

get_rpm_artifacts()
Returns:

An ordered #GStrv list of RPM NEVRs that are included in this module stream.

Return type:

[str]

New in version 2.0.

get_rpm_component(component_name)
Parameters:

component_name (str) – The name of the component to retrieve.

Returns:

The RPM component matching component_name if it exists, else None.

Return type:

Modulemd.ComponentRpm

New in version 2.0.

get_rpm_component_names()
Returns:

An ordered #GStrv list of RPM component names included in this stream.

Return type:

[str]

New in version 2.0.

get_rpm_filters()
Returns:

An ordered #GStrv list of binary RPM names that are filtered out of this module stream.

Return type:

[str]

New in version 2.0.

get_servicelevel(servicelevel_name)
Parameters:

servicelevel_name (str) – The name of a servicelevel to retrieve.

Returns:

The requested servicelevel definition if present in the module stream. None otherwise.

Return type:

Modulemd.ServiceLevel

New in version 2.0.

get_servicelevel_names()
Returns:

An ordered #GStrv list of servicelevel names associated with this module stream.

Return type:

[str]

New in version 2.0.

get_summary(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 module summary, translated to the requested locale if available. Translation information is managed by the Modulemd.Translation and Modulemd.TranslationEntry objects.

Return type:

str

New in version 2.0.

get_tracker()
Returns:

The module bug tracker website address.

Return type:

str

New in version 2.0.

get_xmd()
Returns:

The extensible metadata block as a GLib.Variant.

Return type:

GLib.Variant

is_static_context()
Returns:

Whether the context attribute should be treated as static.

Return type:

bool

New in version 2.11.

remove_content_license(license)
Parameters:

license (str) – A license to remove from the list. Has no effect if the license is not present.

New in version 2.0.

remove_demodularized_rpm(rpm)
Parameters:

rpm (str) – A binary RPM name to remove from a demodularized list.

Remove a binary package name from a list of demodularized packages.

New in version 2.13.

remove_dependencies(deps)
Parameters:

deps (Modulemd.Dependencies) – A Modulemd.Dependencies object to remove from the list for this module stream.

Removes all entries matching deps from the array of Modulemd.Dependencies objects.

New in version 2.4.

remove_module_component(component_name)
Parameters:

component_name (str) – The name of the component to remove from the module stream.

Remove a component from this module stream.

New in version 2.0.

remove_module_license(license)
Parameters:

license (str) – A license to remove from the list. Has no effect if the license is not present.

New in version 2.0.

remove_rpm_api(rpm)
Parameters:

rpm (str) – A binary RPM name to remove from the list of stable public API.

New in version 2.0.

remove_rpm_artifact(nevr)
Parameters:

nevr (str) – An RPM NEVR to remove from the list of artifacts.

New in version 2.0.

remove_rpm_component(component_name)
Parameters:

component_name (str) – The name of the component to remove from the module stream.

Remove a component from this module stream.

New in version 2.0.

remove_rpm_filter(rpm)
Parameters:

rpm (str) – A binary RPM name to remove from the filter list.

New in version 2.0.

search_profiles(profile_pattern)
Parameters:

profile_pattern (str or None) – A globbing pattern to locate one or more profiles in this Modulemd.ModuleStreamV2 object. The names will be compared using fnmatch(3).

Returns:

The list of Modulemd.Profile 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.

Return type:

[Modulemd.Profile]

set_arch(arch)
Parameters:

arch (str) – The module artifact architecture.

Set the module artifact architecture.

New in version 2.0.

set_buildopts(buildopts)
Parameters:

buildopts (Modulemd.Buildopts) – A Modulemd.Buildopts object describing build options that apply globally to components in this module.

Set build options for this module’s components.

New in version 2.0.

set_community(community)
Parameters:

community (str) – The upstream community website for this module.

Set the module community website address.

New in version 2.0.

set_description(description)
Parameters:

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

Set the module description.

New in version 2.0.

set_documentation(documentation)
Parameters:

documentation (str) – The upstream documentation website for this module.

Set the module documentation website address.

New in version 2.0.

set_rpm_artifact_map_entry(entry, digest, checksum)
Parameters:
  • entry (Modulemd.RpmMapEntry) – The RPM map entry to save to the stream.

  • digest (str) – A string representing the digest algorithm used to generate the checksum.

  • checksum (str) – An RPM artifact checksum.

New in version 2.2.

set_static_context()

Marks this Modulemd.ModuleStreamV2 to indicate to dependency solvers that they must treat the context attribute as informative.

New in version 2.11.

set_summary(summary)
Parameters:

summary (str or None) – The untranslated summary of this module.

Set the module summary.

New in version 2.0.

set_tracker(tracker)
Parameters:

tracker (str) – The upstream bug tracker website for this module.

Set the module bug tracker website address.

New in version 2.0.

set_xmd(xmd)
Parameters:

xmd (GLib.Variant) – A GLib.Variant representing arbitrary YAML.

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 GLib.Variant and thus should not be freed by the caller.

New in version 2.0.

unset_static_context()

Marks this Modulemd.ModuleStreamV2 to indicate to dependency solvers that they must ignore the context attribute as a uniqueness element.

New in version 2.11.

Property Details

Modulemd.ModuleStreamV2.props.buildopts
Name:

buildopts

Type:

Modulemd.Buildopts

Default Value:

None

Flags:

READABLE, WRITABLE

Build options for module components

Modulemd.ModuleStreamV2.props.community
Name:

community

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The website address of the upstream community for this module

Modulemd.ModuleStreamV2.props.documentation
Name:

documentation

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The website address of the upstream documentation for this module

Modulemd.ModuleStreamV2.props.static_context
Name:

static-context

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the context is static

Modulemd.ModuleStreamV2.props.tracker
Name:

tracker

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The website address of the upstream bug tracker for this module