Fwupd.Release

g Fwupd.Release Fwupd.Release GObject.Object GObject.Object GObject.Object->Fwupd.Release

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

array_filter_flags (rels, include, exclude)

class

array_from_variant (value)

class

flag_from_string (release_flag)

class

flag_to_string (release_flag)

class

from_variant (value)

class

new ()

class

urgency_from_string (release_urgency)

class

urgency_to_string (release_urgency)

add_category (category)

add_checksum (checksum)

add_flag (flag)

add_issue (issue)

add_location (location)

add_metadata (hash)

add_metadata_item (key, value)

add_report (report)

add_tag (tag)

get_appstream_id ()

get_branch ()

get_categories ()

get_checksums ()

get_created ()

get_description ()

get_detach_caption ()

get_detach_image ()

get_details_url ()

get_filename ()

get_flags ()

get_homepage ()

get_id ()

get_install_duration ()

get_issues ()

get_license ()

get_locations ()

get_metadata ()

get_metadata_item (key)

get_name ()

get_name_variant_suffix ()

get_protocol ()

get_remote_id ()

get_reports ()

get_size ()

get_source_url ()

get_summary ()

get_tags ()

get_trust_flags ()

get_update_image ()

get_update_message ()

get_urgency ()

get_uri ()

get_vendor ()

get_version ()

has_category (category)

has_checksum (checksum)

has_flag (flag)

has_tag (tag)

incorporate (donor)

match_flags (include, exclude)

remove_flag (flag)

set_appstream_id (appstream_id)

set_branch (branch)

set_created (created)

set_description (description)

set_detach_caption (detach_caption)

set_detach_image (detach_image)

set_details_url (details_url)

set_filename (filename)

set_flags (flags)

set_homepage (homepage)

set_id (id)

set_install_duration (duration)

set_license (license)

set_name (name)

set_name_variant_suffix (name_variant_suffix)

set_protocol (protocol)

set_remote_id (remote_id)

set_size (size)

set_source_url (source_url)

set_summary (summary)

set_trust_flags (trust_flags)

set_update_image (update_image)

set_update_message (update_message)

set_urgency (urgency)

set_uri (uri)

set_vendor (vendor)

set_version (version)

to_json (builder)

to_string ()

to_variant ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

remote-id

str

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Fwupd.Release(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Fwupd.ReleaseClass

A firmware release with a specific version.

Devices can have more than one release, and the releases are typically ordered by their version.

See also: [class`FwupdDevice`]

classmethod array_filter_flags(rels, include, exclude)[source]
Parameters:
Raises:

GLib.Error

Returns:

releases

Return type:

[Fwupd.Release]

Creates an array of new releases that match using Fwupd.Release.match_flags().

New in version 1.9.3.

classmethod array_from_variant(value)[source]
Parameters:

value (GLib.Variant) – the serialized data

Returns:

releases, or None if value was invalid

Return type:

[Fwupd.Release]

Creates an array of new releases using serialized data.

New in version 1.2.10.

classmethod flag_from_string(release_flag)[source]
Parameters:

release_flag (str or None) – a string, e.g. trusted-payload

Returns:

enumerated value

Return type:

int

Converts a string to an enumerated release flag.

New in version 1.2.6.

classmethod flag_to_string(release_flag)[source]
Parameters:

release_flag (int) – a release flag, e.g. Fwupd.RELEASE_FLAG_TRUSTED_PAYLOAD

Returns:

identifier string

Return type:

str

Converts an enumerated release flag to a string.

New in version 1.2.6.

classmethod from_variant(value)[source]
Parameters:

value (GLib.Variant) – the serialized data

Returns:

a new Fwupd.Release, or None if value was invalid

Return type:

Fwupd.Release

Creates a new release using serialized data.

New in version 1.0.0.

classmethod new()[source]
Returns:

a new Fwupd.Release

Return type:

Fwupd.Release

Creates a new release.

New in version 0.9.3.

classmethod urgency_from_string(release_urgency)[source]
Parameters:

release_urgency (str or None) – a string, e.g. low

Returns:

enumerated value

Return type:

Fwupd.ReleaseUrgency

Converts a string to an enumerated release urgency value.

New in version 1.4.0.

classmethod urgency_to_string(release_urgency)[source]
Parameters:

release_urgency (Fwupd.ReleaseUrgency) – a release urgency, e.g. Fwupd.ReleaseUrgency.HIGH

Returns:

identifier string

Return type:

str

Converts an enumerated release urgency to a string.

New in version 1.4.0.

add_category(category)[source]
Parameters:

category (str) – the update category, e.g. X-EmbeddedController

Adds the update category.

New in version 1.2.7.

add_checksum(checksum)[source]
Parameters:

checksum (str) – the update container checksum

Sets the update checksum.

New in version 0.9.3.

add_flag(flag)[source]
Parameters:

flag (int) – the #FwupdReleaseFlags

Adds a specific release flag to the release.

New in version 1.2.6.

add_issue(issue)[source]
Parameters:

issue (str) – the update issue, e.g. CVE-2019-12345

Adds an resolved issue to this release.

New in version 1.3.2.

add_location(location)[source]
Parameters:

location (str) – the update URI

Adds an update URI, i.e. where you can download the firmware from.

New in version 1.5.6.

add_metadata(hash)[source]
Parameters:

hash ({object: object}) – the key-values

Sets multiple release metadata items.

New in version 1.0.4.

add_metadata_item(key, value)[source]
Parameters:
  • key (str) – the key

  • value (str) – the value

Sets a release metadata item.

New in version 1.0.4.

add_report(report)[source]
Parameters:

report (Fwupd.Report) – a Fwupd.Report

Adds a report for this release.

New in version 1.8.8.

add_tag(tag)[source]
Parameters:

tag (str) – the update tag, e.g. vendor-factory-2021q1

Adds a specific release tag.

New in version 1.7.3.

get_appstream_id()[source]
Returns:

the AppStream ID, or None if unset

Return type:

str

Gets the AppStream ID.

New in version 0.9.3.

get_branch()[source]
Returns:

the alternate branch, or None if unset

Return type:

str

Gets the update branch.

New in version 1.5.0.

get_categories()[source]
Returns:

the categories, which may be empty

Return type:

[str]

Gets the release categories.

New in version 1.2.7.

get_checksums()[source]
Returns:

the checksums, which may be empty

Return type:

[str]

Gets the release container checksums.

New in version 0.9.3.

get_created()[source]
Returns:

UTC timestamp in UNIX format, or 0 if unset

Return type:

int

Gets when the update was created.

New in version 1.4.0.

get_description()[source]
Returns:

the update description, or None if unset

Return type:

str

Gets the update description in AppStream markup format.

New in version 0.9.3.

get_detach_caption()[source]
Returns:

the string caption, or None if unset

Return type:

str

Gets the optional text caption used to manually detach the device.

New in version 1.3.3.

get_detach_image()[source]
Returns:

the URI, or None if unset

Return type:

str

Gets the optional image used to manually detach the device.

New in version 1.3.3.

get_details_url()[source]
Returns:

the update URL, or None if unset

Return type:

str

Gets the URL for the online update notes.

New in version 1.2.4.

get_filename()[source]
Returns:

the update filename, or None if unset

Return type:

str

Gets the update filename.

New in version 0.9.3.

get_flags()[source]
Returns:

release flags, or 0 if unset

Return type:

int

Gets the release flags.

New in version 1.2.6.

get_homepage()[source]
Returns:

the update homepage, or None if unset

Return type:

str

Gets the update homepage.

New in version 0.9.3.

get_id()[source]
Returns:

the ID, or None if unset

Return type:

str

Gets the release ID, which allows identifying the specific uploaded component.

New in version 1.7.2.

get_install_duration()[source]
Returns:

the estimated time to flash this release (or 0 if unset)

Return type:

int

Gets the time estimate for firmware installation (in seconds)

New in version 1.2.1.

get_issues()[source]
Returns:

the issues, which may be empty

Return type:

[str]

Gets the list of issues fixed in this release.

New in version 1.3.2.

get_license()[source]
Returns:

the update license, or None if unset

Return type:

str

Gets the update license.

New in version 0.9.3.

get_locations()[source]
Returns:

the URIs

Return type:

[str]

Gets the update URI, i.e. where you can download the firmware from.

Typically the first URI will be the main HTTP mirror, but all URIs may not be valid HTTP URIs. For example, “ipns://QmSrPmba” is valid here.

New in version 1.5.6.

get_metadata()[source]
Returns:

the metadata, which may be empty

Return type:

{object: object}

Gets the release metadata.

New in version 1.0.4.

get_metadata_item(key)[source]
Parameters:

key (str) – the key

Returns:

the value, or None if unset

Return type:

str

Gets a release metadata item.

New in version 1.0.4.

get_name()[source]
Returns:

the update name, or None if unset

Return type:

str

Gets the update name.

New in version 0.9.3.

get_name_variant_suffix()[source]
Returns:

the update variant, or None if unset

Return type:

str

Gets the update variant suffix.

New in version 1.3.2.

get_protocol()[source]
Returns:

the update protocol, or None if unset

Return type:

str

Gets the update protocol.

New in version 1.2.2.

get_remote_id()[source]
Returns:

the ID, or None if unset

Return type:

str

Gets the remote ID that can be used for downloading.

New in version 0.9.3.

get_reports()[source]
Returns:

array of reports

Return type:

[Fwupd.Report]

Gets all the reports for this release.

New in version 1.8.8.

get_size()[source]
Returns:

the update size in bytes, or 0 if unset

Return type:

int

Gets the update size.

New in version 0.9.3.

get_source_url()[source]
Returns:

the update source_url, or None if unset

Return type:

str

Gets the URL of the source code used to build this release.

New in version 1.2.4.

get_summary()[source]
Returns:

the update summary, or None if unset

Return type:

str

Gets the update summary.

New in version 0.9.3.

get_tags()[source]
Returns:

the tags, which may be empty

Return type:

[str]

Gets the release tags.

New in version 1.7.3.

get_trust_flags()[source]
Returns:

the trust bitfield, e.g. Fwupd.TrustFlags.PAYLOAD

Return type:

Fwupd.TrustFlags

Gets the trust level of the release.

New in version 0.9.8.

get_update_image()[source]
Returns:

the update image URL, or None if unset

Return type:

str

Gets the update image.

New in version 1.4.5.

get_update_message()[source]
Returns:

the update message, or None if unset

Return type:

str

Gets the update message.

New in version 1.2.4.

get_urgency()[source]
Returns:

the release urgency, or 0 if unset

Return type:

Fwupd.ReleaseUrgency

Gets the release urgency.

New in version 1.4.0.

get_uri()[source]
Returns:

the update URI, or None if unset

Return type:

str

Gets the default update URI.

New in version 0.9.3.

Deprecated since version 1.5.6: Use Fwupd.Release.get_locations() instead.

get_vendor()[source]
Returns:

the update vendor, or None if unset

Return type:

str

Gets the update vendor.

New in version 0.9.3.

get_version()[source]
Returns:

the update version, or None if unset

Return type:

str

Gets the update version.

New in version 0.9.3.

has_category(category)[source]
Parameters:

category (str) – the update category, e.g. X-EmbeddedController

Returns:

True if the release matches

Return type:

bool

Finds out if the release has the update category.

New in version 1.2.7.

has_checksum(checksum)[source]
Parameters:

checksum (str) – the update checksum

Returns:

True if the release matches

Return type:

bool

Finds out if the release has the update container checksum.

New in version 1.2.6.

has_flag(flag)[source]
Parameters:

flag (int) – the #FwupdReleaseFlags

Returns:

True if the flag is set

Return type:

bool

Finds if the release has a specific release flag.

New in version 1.2.6.

has_tag(tag)[source]
Parameters:

tag (str) – the update tag, e.g. vendor-factory-2021q1

Returns:

True if the release matches

Return type:

bool

Finds out if the release has a specific tag.

New in version 1.7.3.

incorporate(donor)[source]
Parameters:

donor (Fwupd.Release) – another Fwupd.Release

Copy all properties from the donor object.

New in version 1.8.8.

match_flags(include, exclude)[source]
Parameters:
Returns:

True if the release flags match

Return type:

bool

Check if the release flags match.

New in version 1.9.3.

remove_flag(flag)[source]
Parameters:

flag (int) – the #FwupdReleaseFlags

Removes a specific release flag from the release.

New in version 1.2.6.

set_appstream_id(appstream_id)[source]
Parameters:

appstream_id (str or None) – the AppStream component ID, e.g. org.hughski.ColorHug2.firmware

Sets the AppStream ID.

New in version 0.9.3.

set_branch(branch)[source]
Parameters:

branch (str or None) – the update one line branch

Sets the alternate branch.

New in version 1.5.0.

set_created(created)[source]
Parameters:

created (int) – UTC timestamp in UNIX format

Sets when the update was created.

New in version 1.4.0.

set_description(description)[source]
Parameters:

description (str or None) – the update description in AppStream markup format

Sets the update description.

New in version 0.9.3.

set_detach_caption(detach_caption)[source]
Parameters:

detach_caption (str or None) – string caption

Sets the optional text caption used to manually detach the device.

New in version 1.3.3.

set_detach_image(detach_image)[source]
Parameters:

detach_image (str or None) – a fully qualified URI

Sets the optional image used to manually detach the device.

New in version 1.3.3.

set_details_url(details_url)[source]
Parameters:

details_url (str or None) – the URL

Sets the URL for the online update notes.

New in version 1.2.4.

set_filename(filename)[source]
Parameters:

filename (str or None) – the update filename on disk

Sets the update filename.

New in version 0.9.3.

set_flags(flags)[source]
Parameters:

flags (int) – release flags, e.g. Fwupd.RELEASE_FLAG_TRUSTED_PAYLOAD

Sets the release flags.

New in version 1.2.6.

set_homepage(homepage)[source]
Parameters:

homepage (str or None) – the URL

Sets the update homepage URL.

New in version 0.9.3.

set_id(id)[source]
Parameters:

id (str or None) – the AppStream component ID, e.g. component:1234

Sets the ID, which allows identifying the specific uploaded component.

New in version 1.7.2.

set_install_duration(duration)[source]
Parameters:

duration (int) – amount of time in seconds

Sets the time estimate for firmware installation (in seconds)

New in version 1.2.1.

set_license(license)[source]
Parameters:

license (str or None) – the update license.

Sets the update license.

New in version 0.9.3.

set_name(name)[source]
Parameters:

name (str or None) – the update name.

Sets the update name.

New in version 0.9.3.

set_name_variant_suffix(name_variant_suffix)[source]
Parameters:

name_variant_suffix (str or None) – the description

Sets the update variant suffix.

New in version 1.3.2.

set_protocol(protocol)[source]
Parameters:

protocol (str or None) – the update protocol, e.g. org.usb.dfu

Sets the update protocol.

New in version 1.2.2.

set_remote_id(remote_id)[source]
Parameters:

remote_id (str) – the release ID, e.g. USB:foo

Sets the remote ID that can be used for downloading.

New in version 0.9.3.

set_size(size)[source]
Parameters:

size (int) – the update size in bytes

Sets the update size.

New in version 0.9.3.

set_source_url(source_url)[source]
Parameters:

source_url (str or None) – the URL

Sets the URL of the source code used to build this release.

New in version 1.2.4.

set_summary(summary)[source]
Parameters:

summary (str or None) – the update one line summary

Sets the update summary.

New in version 0.9.3.

set_trust_flags(trust_flags)[source]
Parameters:

trust_flags (Fwupd.TrustFlags) – the bitfield, e.g. Fwupd.TrustFlags.PAYLOAD

Sets the trust level of the release.

New in version 0.9.8.

set_update_image(update_image)[source]
Parameters:

update_image (str or None) – the update image URL

Sets the update image.

New in version 1.4.5.

set_update_message(update_message)[source]
Parameters:

update_message (str or None) – the update message string

Sets the update message.

New in version 1.2.4.

set_urgency(urgency)[source]
Parameters:

urgency (Fwupd.ReleaseUrgency) – the release urgency, e.g. Fwupd.RELEASE_FLAG_TRUSTED_PAYLOAD

Sets the release urgency.

New in version 1.4.0.

set_uri(uri)[source]
Parameters:

uri (str) – the update URI

Sets the update URI, i.e. where you can download the firmware from.

New in version 0.9.3.

Deprecated since version 1.5.6: Use Fwupd.Release.add_location() instead.

set_vendor(vendor)[source]
Parameters:

vendor (str or None) – the vendor name, e.g. Hughski Limited

Sets the update vendor.

New in version 0.9.3.

set_version(version)[source]
Parameters:

version (str or None) – the update version, e.g. 1.2.4

Sets the update version.

New in version 0.9.3.

to_json(builder)[source]
Parameters:

builder (Json.Builder) – a JSON builder

Adds a fwupd release to a JSON builder

New in version 1.2.6.

to_string()[source]
Returns:

text, or None for invalid

Return type:

str

Builds a text representation of the object.

New in version 0.9.3.

to_variant()[source]
Returns:

the serialized data, or None for error

Return type:

GLib.Variant

Serialize the release data.

New in version 1.0.0.

Property Details

Fwupd.Release.props.remote_id
Name:

remote-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The remote ID.

New in version 1.8.0.