Flatpak.TransactionOperation

g Flatpak.TransactionOperation Flatpak.TransactionOperation GObject.Object GObject.Object GObject.Object->Flatpak.TransactionOperation

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_bundle_path ()

get_commit ()

get_download_size ()

get_installed_size ()

get_is_skipped ()

get_metadata ()

get_old_metadata ()

get_operation_type ()

get_ref ()

get_related_to_ops ()

get_remote ()

get_requires_authentication ()

get_subpaths ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Flatpak.TransactionOperation(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Flatpak.TransactionOperationClass

get_bundle_path()
Returns:

the bundle Gio.File or None

Return type:

Gio.File

Gets the path to the bundle.

get_commit()
Returns:

the commit ID

Return type:

str

Gets the commit ID for the operation.

This information is available when the transaction is resolved, i.e. when Flatpak.Transaction ::ready is emitted.

get_download_size()
Returns:

the download size, in bytes

Return type:

int

Gets the maximum download size for the operation.

Note that this does not include the size of dependencies, and the actual download may be smaller, if some of the data is already available locally.

For uninstall operations, this returns 0.

This information is available when the transaction is resolved, i.e. when Flatpak.Transaction ::ready is emitted.

New in version 1.1.2.

get_installed_size()
Returns:

the installed size, in bytes

Return type:

int

Gets the installed size for the operation.

Note that even for a new install, the extra space required on disk may be smaller than this number, if some of the data is already available locally.

For uninstall operations, this returns 0.

This information is available when the transaction is resolved, i.e. when Flatpak.Transaction ::ready is emitted.

New in version 1.1.2.

get_is_skipped()
Returns:

True if the operation has been marked as to skip, False otherwise

Return type:

bool

Gets whether this operation will be skipped when the transaction is run. Operations are skipped in some transaction situations, for example when an app has reached end of life and needs a rebase, or when it would have been updated but no update is available. By default, skipped operations are not returned by Flatpak.Transaction.get_operations() — but they can be accessed by traversing the operation graph using Flatpak.TransactionOperation.get_related_to_ops().

New in version 1.7.3.

get_metadata()
Returns:

the metadata GLib.KeyFile

Return type:

GLib.KeyFile

Gets the metadata that will be applicable when the operation is done.

This can be compared to the current metadata returned by Flatpak.TransactionOperation.get_old_metadata() to find new required permissions and similar changes.

This information is available when the transaction is resolved, i.e. when Flatpak.Transaction ::ready is emitted.

get_old_metadata()
Returns:

the old metadata GLib.KeyFile

Return type:

GLib.KeyFile

Gets the metadata current metadata for the ref that self works on. Also see Flatpak.TransactionOperation.get_metadata().

This information is available when the transaction is resolved, i.e. when Flatpak.Transaction ::ready is emitted.

get_operation_type()
Returns:

the type of operation, as Flatpak.TransactionOperationType

Return type:

Flatpak.TransactionOperationType

Gets the type of the operation.

get_ref()
Returns:

the ref

Return type:

str

Gets the ref that the operation applies to.

Returns:

the Flatpak.TransactionOperations this one is related to (may be None or an empty array, which are equivalent)

Return type:

[Flatpak.TransactionOperation] or None

Gets the operation(s) which caused this operation to be added to the transaction. In the case of a runtime, it’s the app(s) whose runtime it is, and/or a runtime extension in the special case of an extra-data extension that doesn’t define the “NoRuntime” key. In the case of a related ref such as an extension, it’s the main app or runtime. In the case of a main app or something added to the transaction by e.g. Flatpak.Transaction.add_install() and which is not otherwise needed, None or an empty array will be returned.

Note that an op will be returned even if it’s marked as to be skipped when the transaction is run. Check that using Flatpak.TransactionOperation.get_is_skipped().

Elements in the returned array are only safe to access while the parent Flatpak.Transaction is alive.

New in version 1.7.3.

get_remote()
Returns:

the remote

Return type:

str

Gets the remote that the operation applies to.

get_requires_authentication()
Returns:

whether self requires authentication

Return type:

bool

Gets whether the given operation will require authentication to acquire needed tokens. See also the documentation for Flatpak.Transaction ::ready-pre-auth.

New in version 1.9.1.

get_subpaths()
Returns:

the set of subpaths that will be pulled, or None if no subsetting.

Return type:

[str]

Gets the set of subpaths that will be pulled from this ref.

Some refs are only partially installed, such as translations. These are subset by the toplevel directory (typically by translation name). The subset to install can be specified at install time, but is otherwise decided based on configurations and things like the current locale and how the app was previously installed.

If there is no subsetting active, this will always return None (even though some other APIs also take an empty string to mean no subsetting).

This information is available when the transaction is resolved, i.e. when Flatpak.Transaction ::ready is emitted.

New in version 1.9.1.