Method

FlatpakTransactionadd_rebase_and_uninstall

since: 1.15.4

Declaration [src]

gboolean
flatpak_transaction_add_rebase_and_uninstall (
  FlatpakTransaction* self,
  const char* remote,
  const char* new_ref,
  const char* old_ref,
  const char** subpaths,
  const char** previous_ids,
  GError** error
)

Description [src]

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.

Also adds an operation to uninstall old_ref to this transaction. This operation will only be run if the operation to install/update new_ref succeeds.

If old_ref is not already installed (which can happen if requesting to install an EOLed app, rather than update one which is already installed), the uninstall operation will silently not be added, and this function will behave similarly to flatpak_transaction_add_rebase().

See flatpak_transaction_add_install() for a description of remote.

Available since: 1.15.4

Parameters

remote

Type: const char*

The name of the remote.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
new_ref

Type: const char*

The ref to rebase to.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
old_ref

Type: const char*

The ref to uninstall.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
subpaths

Type: const char**

The subpaths to include, or NULL to install the complete ref.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
previous_ids

Type: An array of char*

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). Must not be NULL.

The array must be NULL-terminated.
The data is owned by the caller of the method.
Each element is a NUL terminated UTF-8 string.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE on success; FALSE with error set on failure.