Flatpak.Transaction

g Flatpak.Transaction Flatpak.Transaction GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GObject.Object->Flatpak.Transaction Gio.Initable->Flatpak.Transaction

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

class

new_for_installation (installation, cancellable)

abort_webflow (id)

add_default_dependency_sources ()

add_dependency_source (installation)

add_install (remote, ref, subpaths)

add_install_bundle (file, gpg_data)

add_install_flatpakref (flatpakref_data)

add_rebase (remote, ref, subpaths, previous_ids)

add_sideload_repo (path)

add_uninstall (ref)

add_update (ref, subpaths, commit)

complete_basic_auth (id, user, password, options)

get_auto_install_debug ()

get_auto_install_sdk ()

get_current_operation ()

get_include_unused_uninstall_ops ()

get_installation ()

get_no_deploy ()

get_no_interaction ()

get_no_pull ()

get_operation_for_ref (remote, ref)

get_operations ()

get_parent_window ()

is_empty ()

run (cancellable)

set_auto_install_debug (auto_install_debug)

set_auto_install_sdk (auto_install_sdk)

set_default_arch (arch)

set_disable_auto_pin (disable_pin)

set_disable_dependencies (disable_dependencies)

set_disable_prune (disable_prune)

set_disable_related (disable_related)

set_disable_static_deltas (disable_static_deltas)

set_force_uninstall (force_uninstall)

set_include_unused_uninstall_ops (include_unused_uninstall_ops)

set_no_deploy (no_deploy)

set_no_interaction (no_interaction)

set_no_pull (no_pull)

set_parent_window (parent_window)

set_reinstall (reinstall)

Virtual Methods

Inherited:

GObject.Object (7), Gio.Initable (1)

do_add_new_remote (reason, from_id, remote_name, url)

do_basic_auth_start (remote, realm, options, id)

do_choose_remote_for_ref (for_ref, runtime_ref, remotes)

do_end_of_lifed (ref, reason, rebase)

do_end_of_lifed_with_rebase (remote, ref, reason, rebased_to_ref, previous_ids)

do_install_authenticator (remote, authenticator_ref)

do_new_operation (operation, progress)

do_operation_done (operation, commit, details)

do_operation_error (operation, error, detail)

do_ready ()

do_ready_pre_auth ()

do_run (cancellable)

do_webflow_done (options, id)

do_webflow_start (remote, url, options, id)

Properties

Name

Type

Flags

Short Description

installation

Flatpak.Installation

r/w/co

The installation instance

no-interaction

bool

r/w/en

The installation instance

Signals

Inherited:

GObject.Object (1)

Name

Short Description

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.

basic-auth-start

The ::basic-auth-start signal gets emitted when a basic user/password authentication is needed during the operation.

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.

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.

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.

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.

new-operation

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

operation-done

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

operation-error

The ::operation-error signal gets emitted when an error occurs during the execution of the 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.

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.

webflow-done

The ::webflow-done signal gets emitted when the authentication finished the webflow, independent of the reason and results.

webflow-start

The ::webflow-start signal gets emitted when some kind of user authentication is needed during the operation.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Flatpak.Transaction(**kwargs)
Bases:

GObject.Object, Gio.Initable

Abstract:

No

Structure:

Flatpak.TransactionClass

classmethod new_for_installation(installation, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a Flatpak.Transaction, or None on failure.

Return type:

Flatpak.Transaction

Creates a new Flatpak.Transaction 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 ().

abort_webflow(id)
Parameters:

id (int) – The webflow id, as passed into the webflow-start signal

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

This is useful for example if you’re showing an authenticaion window with a browser, but the user closed it before it was finished.

New in version 1.5.1.

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.

add_dependency_source(installation)
Parameters:

installation (Flatpak.Installation) – a Flatpak.Installation

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

Also see Flatpak.Transaction.add_default_dependency_sources().

add_install(remote, ref, subpaths)
Parameters:
  • remote (str) – the name of the remote

  • ref (str) – the ref

  • subpaths ([str] or None) – subpaths to install, or the empty list or None to pull all subpaths

Raises:

GLib.Error

Returns:

True on success; False with error set on failure.

Return type:

bool

Adds installing the given ref to this transaction.

The remote can either be a configured remote of the installation, or a file:// uri pointing at a local repository to install from, in which case an origin remote is created.

add_install_bundle(file, gpg_data)
Parameters:
  • file (Gio.File) – a Gio.File that is an flatpak bundle

  • gpg_data (GLib.Bytes or None) – GPG key with which to check bundle signatures, or None to use the key embedded in the bundle (if any)

Raises:

GLib.Error

Returns:

True on success; False with error set on failure.

Return type:

bool

Adds installing the given bundle to this transaction.

add_install_flatpakref(flatpakref_data)
Parameters:

flatpakref_data (GLib.Bytes) – data from a flatpakref file

Raises:

GLib.Error

Returns:

True on success; False with error set on failure.

Return type:

bool

Adds installing the given flatpakref to this transaction.

add_rebase(remote, ref, subpaths, previous_ids)
Parameters:
  • remote (str) – the name of the remote

  • ref (str) – the ref

  • subpaths (str or None) – the subpaths to include, or None to install the complete ref

  • previous_ids ([str] or None) – Previous ids to add to the given ref. These should simply be the ids, not the full ref names (e.g. org.foo.Bar, not org.foo.Bar/x86_64/master).

Raises:

GLib.Error

Returns:

True on success; False with error set on failure.

Return type:

bool

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.

See Flatpak.Transaction.add_install() for a description of remote.

New in version 1.3.3..

add_sideload_repo(path)
Parameters:

path (str) – a path to a local flatpak repository

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.

New in version 1.7.1.

add_uninstall(ref)
Parameters:

ref (str) – the ref

Raises:

GLib.Error

Returns:

True on success; False with error set on failure.

Return type:

bool

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

add_update(ref, subpaths, commit)
Parameters:
  • ref (str) – the ref

  • subpaths ([str] or None) – subpaths to install; None to use the current set plus the set of configured languages, or { NULL } or { "", NULL } to pull all subpaths.

  • commit (str or None) – the commit to update to, or None to use the latest

Raises:

GLib.Error

Returns:

True on success; False with error set on failure.

Return type:

bool

Adds updating the given ref to this transaction.

complete_basic_auth(id, user, password, options)
Parameters:
  • id (int) – The webflow id, as passed into the webflow-start signal

  • user (str) – The user name, or None if aborting request

  • password (str) – The password

  • options (GLib.Variant) – Extra a{sv] variant with options (or None), currently unused.

Finishes (or aborts) an ongoing basic auth request.

New in version 1.5.2.

get_auto_install_debug()
Returns:

True if auto_install_debug is set, False otherwise

Return type:

bool

Gets the value set by Flatpak.Transaction.set_auto_install_debug().

New in version 1.13.3.

get_auto_install_sdk()
Returns:

True if auto_install_sdk is set, False otherwise

Return type:

bool

Gets the value set by Flatpak.Transaction.set_auto_install_sdk().

New in version 1.13.3.

get_current_operation()
Returns:

the current Flatpak.TransactionOperation

Return type:

Flatpak.TransactionOperation

Gets the current operation.

get_include_unused_uninstall_ops()
Returns:

True if include_unused_uninstall_ops is set, False otherwise

Return type:

bool

Gets the value set by Flatpak.Transaction.set_include_unused_uninstall_ops().

New in version 1.9.1.

get_installation()
Returns:

a Flatpak.Installation

Return type:

Flatpak.Installation

Gets the installation this transaction was created for.

get_no_deploy()
Returns:

True if no_deploy is set, False otherwise

Return type:

bool

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

New in version 1.5.1.

get_no_interaction()
Returns:

True if the transaction is not interactive, False otherwise

Return type:

bool

Gets whether the transaction is interactive. See Flatpak.Transaction.set_no_interaction().

New in version 1.13.0.

get_no_pull()
Returns:

True if no_pull is set, False otherwise

Return type:

bool

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

New in version 1.5.1.

get_operation_for_ref(remote, ref)
Parameters:
  • remote (str or None) – a remote name

  • ref (str) – a ref

Raises:

GLib.Error

Returns:

the Flatpak.TransactionOperation for ref, or None with error set

Return type:

Flatpak.TransactionOperation

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

New in version 1.13.3.

get_operations()
Returns:

a GLib.List of operations

Return type:

[Flatpak.TransactionOperation]

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

get_parent_window()
Returns:

a window name, or None

Return type:

str

Gets the parent window set for this transaction, or None if unset. See Flatpak.Transaction.get_parent_window().

New in version 1.5.1.

is_empty()
Returns:

True if the transaction is empty

Return type:

bool

Returns whether the transaction contains any non-skipped operations.

run(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable

Raises:

GLib.Error

Returns:

True on success, False if an error occurred

Return type:

bool

Executes the transaction.

During the course of the execution, various signals will get emitted. The Flatpak.Transaction ::choose-remote-for-ref and Flatpak.Transaction ::add-new-remote signals may get emitted while resolving operations. Flatpak.Transaction ::ready is emitted when the transaction has been fully resolved, and Flatpak.Transaction ::new-operation and Flatpak.Transaction ::operation-done are emitted while the operations are carried out. If an error occurs at any point during the execution, Flatpak.Transaction ::operation-error is emitted.

Note that this call blocks until the transaction is done.

set_auto_install_debug(auto_install_debug)
Parameters:

auto_install_debug (bool) – whether to auto install debug info for apps

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.

New in version 1.13.3.

set_auto_install_sdk(auto_install_sdk)
Parameters:

auto_install_sdk (bool) – whether to auto install SDKs for apps

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.

New in version 1.13.3.

set_default_arch(arch)
Parameters:

arch (str) – the arch to make default

Sets the architecture to default to where it is unspecified.

set_disable_auto_pin(disable_pin)
Parameters:

disable_pin (bool) – whether to disable auto-pinning

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.

New in version 1.9.1.

set_disable_dependencies(disable_dependencies)
Parameters:

disable_dependencies (bool) – whether to disable runtime dependencies

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

set_disable_prune(disable_prune)
Parameters:

disable_prune (bool) – whether to avoid pruning

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

Parameters:

disable_related (bool) – whether to avoid adding related refs

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

set_disable_static_deltas(disable_static_deltas)
Parameters:

disable_static_deltas (bool) – whether to avoid static deltas

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

set_force_uninstall(force_uninstall)
Parameters:

force_uninstall (bool) – whether to force-uninstall refs

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

set_include_unused_uninstall_ops(include_unused_uninstall_ops)
Parameters:

include_unused_uninstall_ops (bool) – whether to 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.

No guarantees are made about the exact hueristic used; e.g. only end-of-life unused runtimes may be uninstalled with this set. To see the full list of unused runtimes in an installation, use Flatpak.Installation.list_unused_refs().

New in version 1.9.1.

set_no_deploy(no_deploy)
Parameters:

no_deploy (bool) – whether to avoid deploying

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

set_no_interaction(no_interaction)
Parameters:

no_interaction (bool) – Whether to disallow interactive authorization for operations

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.

By default, the setting from the parent Flatpak.Installation is used.

New in version 1.7.3.

set_no_pull(no_pull)
Parameters:

no_pull (bool) – whether to avoid pulls

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

set_parent_window(parent_window)
Parameters:

parent_window (str) – whether to avoid pulls

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.

The format of this string depends on the display system in use, and is the same as used by xdg-desktop-portal.

On X11 it should be of the form x11:$xid where $xid is the hex version of the xwindows id.

On wayland is should be wayland:$handle where handle is gotten by using the export call of the xdg-foreign-unstable wayland extension.

New in version 1.5.1.

set_reinstall(reinstall)
Parameters:

reinstall (bool) – whether to reinstall refs

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

do_add_new_remote(reason, from_id, remote_name, url) virtual
Parameters:
Return type:

bool

do_basic_auth_start(remote, realm, options, id) virtual
Parameters:
Return type:

bool

do_choose_remote_for_ref(for_ref, runtime_ref, remotes) virtual
Parameters:
  • for_ref (str) –

  • runtime_ref (str) –

  • remotes (str) –

Return type:

int

do_end_of_lifed(ref, reason, rebase) virtual
Parameters:
  • ref (str) –

  • reason (str) –

  • rebase (str) –

do_end_of_lifed_with_rebase(remote, ref, reason, rebased_to_ref, previous_ids) virtual
Parameters:
  • remote (str) –

  • ref (str) –

  • reason (str) –

  • rebased_to_ref (str) –

  • previous_ids (str) –

Return type:

bool

do_install_authenticator(remote, authenticator_ref) virtual
Parameters:
  • remote (str) –

  • authenticator_ref (str) –

do_new_operation(operation, progress) virtual
Parameters:
do_operation_done(operation, commit, details) virtual
Parameters:
do_operation_error(operation, error, detail) virtual
Parameters:
Return type:

bool

do_ready() virtual
Return type:

bool

do_ready_pre_auth() virtual
Return type:

bool

do_run(cancellable) virtual
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable

Returns:

True on success, False if an error occurred

Return type:

bool

Executes the transaction.

During the course of the execution, various signals will get emitted. The Flatpak.Transaction ::choose-remote-for-ref and Flatpak.Transaction ::add-new-remote signals may get emitted while resolving operations. Flatpak.Transaction ::ready is emitted when the transaction has been fully resolved, and Flatpak.Transaction ::new-operation and Flatpak.Transaction ::operation-done are emitted while the operations are carried out. If an error occurs at any point during the execution, Flatpak.Transaction ::operation-error is emitted.

Note that this call blocks until the transaction is done.

do_webflow_done(options, id) virtual
Parameters:
do_webflow_start(remote, url, options, id) virtual
Parameters:
Return type:

bool

Signal Details

Flatpak.Transaction.signals.add_new_remote(transaction, reason, from_id, suggested_remote_name, url)
Signal Name:

add-new-remote

Flags:

RUN_LAST

Parameters:
Returns:

True to add the remote

Return type:

bool

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.signals.basic_auth_start(transaction, remote, realm, options, id)
Signal Name:

basic-auth-start

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • remote (str) – The remote we’re authenticating with

  • realm (str) – The url to show

  • options (GLib.Variant) – Extra options, currently unused

  • id (int) – The id of the operation, can be used to finish it

Return type:

bool

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.

If the client does not support basic auth then return False from this signal (or don’t implement it). This will abort the authentication and likely result in the transaction failing (unless the authentication was somehow optional).

New in version 1.5.2.

Flatpak.Transaction.signals.choose_remote_for_ref(transaction, for_ref, runtime_ref, remotes)
Signal Name:

choose-remote-for-ref

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • for_ref (str) – The ref we are installing

  • runtime_ref (str) – The ref we are looking for

  • remotes ([str]) – the remotes that has the ref, sorted in prio order

Returns:

the index of the remote to use, or -1 to not pick one (and fail)

Return type:

int

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

Flatpak.Transaction.signals.end_of_lifed(transaction, ref, reason, rebase)
Signal Name:

end-of-lifed

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • ref (str) – The ref we are installing

  • reason (str) – The eol reason, or None

  • rebase (str) – The new name, if rebased, or None

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.signals.end_of_lifed_with_rebase(transaction, remote, ref, reason, rebased_to_ref, previous_ids)
Signal Name:

end-of-lifed-with-rebase

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • remote (str) – The remote for the ref we are processing

  • ref (str) – The ref we are processing

  • reason (str) – The eol reason, or None

  • rebased_to_ref (str) – The new name, if rebased, or None

  • previous_ids ([str]) – The previous names for the rebased ref (if any), including the one from ref

Returns:

True if the operation on this end-of-lifed ref should be skipped (e.g. because the rebased ref has been added to the transaction), False if it should remain.

Return type:

bool

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 Flatpak.Transaction ::end-of-lifed, this signal allows for the transaction to be modified in order to e.g. install the rebased ref.

If the caller wants to install the rebased ref, they should call Flatpak.Transaction.add_uninstall() on ref, Flatpak.Transaction.add_rebase() on rebased_to_ref, and return True. Otherwise False may be returned.

New in version 1.3.2.

Flatpak.Transaction.signals.install_authenticator(transaction, remote, authenticator_ref)
Signal Name:

install-authenticator

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • remote (str) – The remote name

  • authenticator_ref (str) – The ref for the 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.

The application can handle this signal, and if so create another transaction to install the authenticator.

The default handler does nothing, and if the authenticator is not installed when the signal handler fails the transaction will error out.

New in version 1.8.0.

Flatpak.Transaction.signals.new_operation(transaction, operation, progress)
Signal Name:

new-operation

Flags:

RUN_LAST

Parameters:

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

Flatpak.Transaction.signals.operation_done(transaction, operation, commit, result)
Signal Name:

operation-done

Flags:

RUN_LAST

Parameters:

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

Flatpak.Transaction.signals.operation_error(transaction, operation, error, details)
Signal Name:

operation-error

Flags:

RUN_LAST

Parameters:
Returns:

the True to contine transaction, False to stop

Return type:

bool

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

Flatpak.Transaction.signals.ready(transaction)
Signal Name:

ready

Flags:

RUN_LAST

Parameters:

transaction (Flatpak.Transaction) – The object which received the signal

Returns:

True to carry on with the transaction, False to abort

Return type:

bool

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.signals.ready_pre_auth(transaction)
Signal Name:

ready-pre-auth

Flags:

RUN_LAST

Parameters:

transaction (Flatpak.Transaction) – The object which received the signal

Returns:

True to carry on with the transaction, False to abort

Return type:

bool

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.

At this point Flatpak.Transaction.get_operations() will return all the operations that will be executed as part of the transaction. You can call Flatpak.TransactionOperation.get_requires_authentication() to see which will require authentication.

New in version 1.9.1.

Flatpak.Transaction.signals.webflow_done(transaction, options, id)
Signal Name:

webflow-done

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • options (GLib.Variant) – Extra options, currently unused

  • id (int) – The id of the operation

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.

New in version 1.5.1.

Flatpak.Transaction.signals.webflow_start(transaction, remote, url, options, id)
Signal Name:

webflow-start

Flags:

RUN_LAST

Parameters:
  • transaction (Flatpak.Transaction) – The object which received the signal

  • remote (str) – The remote we’re authenticating with

  • url (str) – The url to show

  • options (GLib.Variant) – Extra options, currently unused

  • id (int) – The id of the operation, can be used to cancel it

Return type:

bool

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.

If the client does not support webflow then return False from this signal (or don’t implement it). This will abort the authentication and likely result in the transaction failing (unless the authentication was somehow optional).

During the time between webflow-start and webflow-done the client can call Flatpak.Transaction.abort_webflow() to manually abort the authentication. This is useful if the user aborted the authentication operation some way, like e.g. closing the browser window.

New in version 1.5.1.

Property Details

Flatpak.Transaction.props.installation
Name:

installation

Type:

Flatpak.Installation

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The installation that the transaction operates on.

Flatpak.Transaction.props.no_interaction
Name:

no-interaction

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

True if the transaction is not interactive, False otherwise.

See Flatpak.Transaction.set_no_interaction().

New in version 1.13.0.