TransactionOperation

class TransactionOperation(**properties: Any)

Superclasses: Object

Constructors:

TransactionOperation(**properties)

Methods

class TransactionOperation
get_bundle_path() File

Gets the path to the bundle.

get_commit() str

Gets the commit ID for the operation.

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

get_download_size() 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 Transaction::ready is emitted.

Added in version 1.1.2.

get_installed_size() 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 Transaction::ready is emitted.

Added in version 1.1.2.

get_is_skipped() 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 get_operations() — but they can be accessed by traversing the operation graph using get_related_to_ops().

Added in version 1.7.3.

get_metadata() KeyFile

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

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

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

get_old_metadata() KeyFile

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

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

get_operation_type() TransactionOperationType

Gets the type of the operation.

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. 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 get_is_skipped().

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

Added in version 1.7.3.

get_remote() str

Gets the remote that the operation applies to.

get_requires_authentication() bool

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

Added in version 1.9.1.

get_subpaths() list[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 Transaction::ready is emitted.

Added in version 1.9.1.