Class

FlatpakTransaction

Description

class Flatpak.Transaction : GObject.Object
  implements Gio.Initable {
  /* No available fields */
}

No description available.

Hierarchy

hierarchy this FlatpakTransaction implements_0 GInitable this--implements_0 ancestor_0 GObject ancestor_0--this

Ancestors

Implements

Constructors

flatpak_transaction_new_for_installation

Creates a new FlatpakTransaction object that can be used to do installation and updates of multiple refs, as well as their dependencies, in a single operation. Set the options you want on the transaction and add the refs you want to install/update, then start the transaction with flatpak_transaction_run ().

Instance methods

flatpak_transaction_abort_webflow

Cancel an ongoing webflow authentication request. This can be call in the time between FlatpakTransaction::webflow-start returned TRUE, and FlatpakTransaction::webflow-done is emitted. It will cancel the ongoing authentication operation.

since: 1.5.1

flatpak_transaction_add_default_dependency_sources

Similar to flatpak_transaction_add_dependency_source(), but adds all the default installations, which means all the defined system-wide (but not per-user) installations.

flatpak_transaction_add_dependency_source

Adds an extra installation as a source for application dependencies. This means that applications can be installed in this transaction relying on runtimes from this additional installation (whereas it would normally install required runtimes that are not installed in the installation the transaction works on).

flatpak_transaction_add_install

Adds installing the given ref to this transaction.

flatpak_transaction_add_install_bundle

Adds installing the given bundle to this transaction.

flatpak_transaction_add_install_flatpakref

Adds installing the given flatpakref to this transaction.

flatpak_transaction_add_install_image

Install a Flatpak from a container image. The image is specified.

flatpak_transaction_add_rebase

Adds updating the previous_ids of the given ref to this transaction, via either installing the ref if it was not already present or updating it. This will treat ref as the result of following an eol-rebase, and data migration from the refs in previous_ids will be set up.

since: 1.3.3

flatpak_transaction_add_rebase_and_uninstall

Adds updating the previous_ids of the given new_ref to this transaction, via either installing the new_ref if it was not already present or updating it. This will treat new_ref as the result of following an eol-rebase, and data migration from the refs in previous_ids will be set up.

since: 1.15.4

flatpak_transaction_add_sideload_image_collection

Adds a set of images to be used as source for installation. This is similar to flatpak_transaction_add_sideload_repo(), but the Flatpaks are stored as OCI images rather than ostree commits, and the images are used for all OCI remotes without regard to collection ID.

since: 1.7.1

flatpak_transaction_add_sideload_repo

Adds an extra local ostree repo as source for installation. This is equivalent to using the sideload-repos directories (see flatpak(1)), but can be done dynamically. Any path added here is used in addition to ones in those directories.

since: 1.7.1

flatpak_transaction_add_sync_preinstalled

Adds preinstall operations to this transaction. This can involve both installing and removing refs, based on /etc/preinstall.d contents and what the system had preinstalled before.

flatpak_transaction_add_uninstall

Adds uninstalling the given ref to this transaction. If the transaction is set to not deploy updates, the request is ignored.

flatpak_transaction_add_update

Adds updating the given ref to this transaction.

flatpak_transaction_complete_basic_auth

Finishes (or aborts) an ongoing basic auth request.

since: 1.5.2

flatpak_transaction_get_auto_install_debug

Gets the value set by flatpak_transaction_set_auto_install_debug().

since: 1.13.3

flatpak_transaction_get_auto_install_sdk

Gets the value set by flatpak_transaction_set_auto_install_sdk().

since: 1.13.3

flatpak_transaction_get_current_operation

Gets the current operation.

flatpak_transaction_get_include_unused_uninstall_ops

Gets the value set by flatpak_transaction_set_include_unused_uninstall_ops().

since: 1.9.1

flatpak_transaction_get_installation

Gets the installation this transaction was created for.

flatpak_transaction_get_no_deploy

Gets whether the transaction is only downloading updates, and not deploying them.

since: 1.5.1

flatpak_transaction_get_no_interaction

Gets whether the transaction is interactive. See flatpak_transaction_set_no_interaction().

since: 1.13.0

flatpak_transaction_get_no_pull

Gets whether the transaction should operate only on locally available data.

since: 1.5.1

flatpak_transaction_get_operation_for_ref

Gets the operation for ref, if any match. If remote is non-NULL, only an operation for that remote will be returned. If remote is NULL and the transaction has more than one operation for ref from different remotes, an error will be returned.

since: 1.13.3

flatpak_transaction_get_operations

Gets the list of operations. Skipped operations are not included. The order of the list is the order in which the operations are executed.

flatpak_transaction_get_parent_window

Gets the parent window set for this transaction, or NULL if unset. See flatpak_transaction_get_parent_window().

since: 1.5.1

flatpak_transaction_is_empty

Returns whether the transaction contains any non-skipped operations.

flatpak_transaction_run

Executes the transaction.

flatpak_transaction_set_auto_install_debug

When this is set to TRUE, Flatpak will automatically install the debug info for each app currently being installed or updated, as well as its dependencies. Does nothing if an uninstall is taking place.

since: 1.13.3

flatpak_transaction_set_auto_install_sdk

When this is set to TRUE, Flatpak will automatically install the SDK for each app currently being installed or updated. Does nothing if an uninstall is taking place.

since: 1.13.3

flatpak_transaction_set_default_arch

Sets the architecture to default to where it is unspecified.

flatpak_transaction_set_disable_auto_pin

Normally the transaction pins any explicit installations so they will not be automatically removed. But this can be disabled if you don’t want this behaviour.

since: 1.9.1

flatpak_transaction_set_disable_dependencies

Sets whether the transaction should ignore runtime dependencies when resolving operations for applications.

flatpak_transaction_set_disable_prune

Sets whether the transaction should avoid pruning the local OSTree repository after updating.

flatpak_transaction_set_disable_related

Sets whether the transaction should avoid adding related refs when resolving operations. Related refs are extensions that are suggested by apps, such as locales.

flatpak_transaction_set_disable_static_deltas

Sets whether the transaction should avoid using static deltas when pulling.

flatpak_transaction_set_force_uninstall

Sets whether the transaction should uninstall files even if they’re used by a running application.

flatpak_transaction_set_include_unused_uninstall_ops

When this is set to TRUE, Flatpak will add uninstall operations to the transaction for each runtime it considers unused. This is used by the “update” CLI command to garbage collect runtimes and free disk space.

since: 1.9.1

flatpak_transaction_set_no_deploy

Sets whether the transaction should download updates, but not deploy them.

flatpak_transaction_set_no_interaction

This method can be used to prevent interactive authorization dialogs to appear for operations on self. This is useful for background operations that are not directly triggered by a user action.

since: 1.7.3

flatpak_transaction_set_no_pull

Sets whether the transaction should operate only on locally available data.

flatpak_transaction_set_parent_window

Sets the parent window (if any) to use for any UI show by this transaction. This is used by authenticators if they need to interact with the user during authentication.

since: 1.5.1

flatpak_transaction_set_reinstall

Sets whether the transaction should uninstall first if a ref is already installed.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GInitable (1)
g_initable_init

Initializes the object implementing the interface.

Properties

Flatpak.Transaction:installation

The installation that the transaction operates on.

Flatpak.Transaction:no-interaction

TRUE if the transaction is not interactive, FALSE otherwise.

since: 1.13.0

Signals

Flatpak.Transaction::add-new-remote

The ::add-new-remote signal gets emitted if, as part of the transaction, it is required or recommended that a new remote is added, for the reason described in reason.

Flatpak.Transaction::basic-auth-start

The ::basic-auth-start signal gets emitted when a basic user/password authentication is needed during the operation. If the caller handles this it should ask the user for the user and password and return TRUE. Once the information is gathered call flatpak_transaction_complete_basic_auth() with it.

since: 1.5.2

Flatpak.Transaction::choose-remote-for-ref

The ::choose-remote-for-ref signal gets emitted when a remote needs to be selected during the execution of the transaction.

Flatpak.Transaction::end-of-lifed

The ::end-of-lifed signal gets emitted when a ref is found to be marked as end-of-life during the execution of the transaction.

Flatpak.Transaction::end-of-lifed-with-rebase

The ::end-of-lifed-with-rebase signal gets emitted when a ref is found to be marked as end-of-life before the transaction begins. Unlike FlatpakTransaction::end-of-lifed, this signal allows for the transaction to be modified in order to e.g. install the rebased ref.

since: 1.3.2

Flatpak.Transaction::install-authenticator

The ::install-authenticator signal gets emitted if, as part of resolving the transaction, we need to use an authenticator, but the authentication is not installed, but is available to be installed from the ref.

since: 1.8.0

Flatpak.Transaction::new-operation

The ::new-operation signal gets emitted during the execution of the transaction when a new operation is beginning.

Flatpak.Transaction::operation-done

The ::operation-done signal gets emitted during the execution of the transaction when an operation is finished.

Flatpak.Transaction::operation-error

The ::operation-error signal gets emitted when an error occurs during the execution of the transaction.

Flatpak.Transaction::ready

The ::ready signal is emitted when all the refs involved in the operation have been resolved to commits, and the required authentication for all ops is gotten. At this point flatpak_transaction_get_operations() will return all the operations that will be executed as part of the transaction.

Flatpak.Transaction::ready-pre-auth

The ::ready-pre-auth signal is emitted when all the refs involved in the transaction have been resolved to commits, but we might not necessarily have asked for authentication for all their required operations. This is very similar to the ::ready signal, and you can choose which one (or both) to use depending on how you want to handle authentication in your user interface.

since: 1.9.1

Flatpak.Transaction::webflow-done

The ::webflow-done signal gets emitted when the authentication finished the webflow, independent of the reason and results. If you for were showing a web-browser window it can now be closed.

since: 1.5.1

Flatpak.Transaction::webflow-start

The ::webflow-start signal gets emitted when some kind of user authentication is needed during the operation. If the caller handles this it should show the url in a webbrowser and return TRUE. This will eventually cause the webbrowser to finish the authentication operation and operation will continue, as signaled by the webflow-done being emitted.

since: 1.5.1

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct FlatpakTransactionClass {
  GObjectClass parent_class;
  void (* new_operation) (
    FlatpakTransaction* transaction,
    FlatpakTransactionOperation* operation,
    FlatpakTransactionProgress* progress
  );
  void (* operation_done) (
    FlatpakTransaction* transaction,
    FlatpakTransactionOperation* operation,
    const char* commit,
    FlatpakTransactionResult details
  );
  gboolean (* operation_error) (
    FlatpakTransaction* transaction,
    FlatpakTransactionOperation* operation,
    const GError* error,
    FlatpakTransactionErrorDetails detail
  );
  int (* choose_remote_for_ref) (
    FlatpakTransaction* transaction,
    const char* for_ref,
    const char* runtime_ref,
    const char* const* remotes
  );
  void (* end_of_lifed) (
    FlatpakTransaction* transaction,
    const char* ref,
    const char* reason,
    const char* rebase
  );
  gboolean (* ready) (
    FlatpakTransaction* transaction
  );
  gboolean (* add_new_remote) (
    FlatpakTransaction* transaction,
    FlatpakTransactionRemoteReason reason,
    const char* from_id,
    const char* remote_name,
    const char* url
  );
  gboolean (* run) (
    FlatpakTransaction* transaction,
    GCancellable* cancellable,
    GError** error
  );
  gboolean (* end_of_lifed_with_rebase) (
    FlatpakTransaction* transaction,
    const char* remote,
    const char* ref,
    const char* reason,
    const char* rebased_to_ref,
    const char** previous_ids
  );
  gboolean (* webflow_start) (
    FlatpakTransaction* transaction,
    const char* remote,
    const char* url,
    GVariant* options,
    guint id
  );
  void (* webflow_done) (
    FlatpakTransaction* transaction,
    GVariant* options,
    guint id
  );
  gboolean (* basic_auth_start) (
    FlatpakTransaction* transaction,
    const char* remote,
    const char* realm,
    GVariant* options,
    guint id
  );
  void (* install_authenticator) (
    FlatpakTransaction* transaction,
    const char* remote,
    const char* authenticator_ref
  );
  gboolean (* ready_pre_auth) (
    FlatpakTransaction* transaction
  );
  gpointer padding;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.

new_operation: void (* new_operation) ( FlatpakTransaction* transaction, FlatpakTransactionOperation* operation, FlatpakTransactionProgress* progress )

No description available.

operation_done: void (* operation_done) ( FlatpakTransaction* transaction, FlatpakTransactionOperation* operation, const char* commit, FlatpakTransactionResult details )

No description available.

operation_error: gboolean (* operation_error) ( FlatpakTransaction* transaction, FlatpakTransactionOperation* operation, const GError* error, FlatpakTransactionErrorDetails detail )

No description available.

choose_remote_for_ref: int (* choose_remote_for_ref) ( FlatpakTransaction* transaction, const char* for_ref, const char* runtime_ref, const char* const* remotes )

No description available.

end_of_lifed: void (* end_of_lifed) ( FlatpakTransaction* transaction, const char* ref, const char* reason, const char* rebase )

No description available.

ready: gboolean (* ready) ( FlatpakTransaction* transaction )

No description available.

add_new_remote: gboolean (* add_new_remote) ( FlatpakTransaction* transaction, FlatpakTransactionRemoteReason reason, const char* from_id, const char* remote_name, const char* url )

No description available.

run: gboolean (* run) ( FlatpakTransaction* transaction, GCancellable* cancellable, GError** error )

No description available.

end_of_lifed_with_rebase: gboolean (* end_of_lifed_with_rebase) ( FlatpakTransaction* transaction, const char* remote, const char* ref, const char* reason, const char* rebased_to_ref, const char** previous_ids )

No description available.

webflow_start: gboolean (* webflow_start) ( FlatpakTransaction* transaction, const char* remote, const char* url, GVariant* options, guint id )

No description available.

webflow_done: void (* webflow_done) ( FlatpakTransaction* transaction, GVariant* options, guint id )

No description available.

basic_auth_start: gboolean (* basic_auth_start) ( FlatpakTransaction* transaction, const char* remote, const char* realm, GVariant* options, guint id )

No description available.

install_authenticator: void (* install_authenticator) ( FlatpakTransaction* transaction, const char* remote, const char* authenticator_ref )

No description available.

ready_pre_auth: gboolean (* ready_pre_auth) ( FlatpakTransaction* transaction )

No description available.

padding: gpointer

No description available.

Virtual methods

Flatpak.TransactionClass.add_new_remote
No description available.

Flatpak.TransactionClass.basic_auth_start
No description available.

Flatpak.TransactionClass.end_of_lifed
No description available.

Flatpak.TransactionClass.new_operation
No description available.

Flatpak.TransactionClass.operation_done
No description available.

Flatpak.TransactionClass.operation_error
No description available.

Flatpak.TransactionClass.ready
No description available.

Flatpak.TransactionClass.ready_pre_auth
No description available.

Flatpak.TransactionClass.run

Executes the transaction.

Flatpak.TransactionClass.webflow_done
No description available.

Flatpak.TransactionClass.webflow_start
No description available.