"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "common/flatpak-transaction.c" between
flatpak-1.15.2.tar.xz and flatpak-1.15.3.tar.xz

About: Flatpak is a Linux application sandboxing and distribution framework. Pre-release.

flatpak-transaction.c  (flatpak-1.15.2.tar.xz):flatpak-transaction.c  (flatpak-1.15.3.tar.xz)
skipping to change at line 2242 skipping to change at line 2242
if (op->kind == FLATPAK_TRANSACTION_OPERATION_UNINSTALL) if (op->kind == FLATPAK_TRANSACTION_OPERATION_UNINSTALL)
{ {
for (i = 0; i < related->len; i++) for (i = 0; i < related->len; i++)
{ {
FlatpakRelated *rel = g_ptr_array_index (related, i); FlatpakRelated *rel = g_ptr_array_index (related, i);
FlatpakTransactionOperation *related_op; FlatpakTransactionOperation *related_op;
if (!rel->delete) if (!rel->delete)
continue; continue;
if (priv->no_deploy)
{
g_info ("Skipping uninstallation of %s for no deploy transaction",
flatpak_decomposed_get_ref (rel->ref));
continue;
}
related_op = flatpak_transaction_add_op (self, rel->remote, rel->ref, related_op = flatpak_transaction_add_op (self, rel->remote, rel->ref,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
FLATPAK_TRANSACTION_OPERATION _UNINSTALL, FLATPAK_TRANSACTION_OPERATION _UNINSTALL,
FALSE, error); FALSE, error);
if (related_op == NULL) if (related_op == NULL)
return FALSE; return FALSE;
related_op->non_fatal = TRUE; related_op->non_fatal = TRUE;
related_op->fail_if_op_fails = op; related_op->fail_if_op_fails = op;
flatpak_transaction_operation_add_related_to_op (related_op, op); flatpak_transaction_operation_add_related_to_op (related_op, op);
skipping to change at line 2709 skipping to change at line 2716
return flatpak_fail_error (error, FLATPAK_ERROR_ALREADY_INSTALLED, return flatpak_fail_error (error, FLATPAK_ERROR_ALREADY_INSTALLED,
_("%s is already installed"), pref); _("%s is already installed"), pref);
else else
return flatpak_fail_error (error, FLATPAK_ERROR_DIFFERENT_REMOTE, return flatpak_fail_error (error, FLATPAK_ERROR_DIFFERENT_REMOTE,
_("%s is already installed from remote %s "), _("%s is already installed from remote %s "),
pref, origin); pref, origin);
} }
} }
else if (kind == FLATPAK_TRANSACTION_OPERATION_UNINSTALL) else if (kind == FLATPAK_TRANSACTION_OPERATION_UNINSTALL)
{ {
/* Skip uninstall for no deploy transactions. */
if (priv->no_deploy)
{
g_info ("Skipping uninstallation of %s for no deploy transaction", pre
f);
return TRUE;
}
if (!dir_ref_is_installed (priv->dir, ref, &origin, NULL)) if (!dir_ref_is_installed (priv->dir, ref, &origin, NULL))
return flatpak_fail_error (error, FLATPAK_ERROR_NOT_INSTALLED, return flatpak_fail_error (error, FLATPAK_ERROR_NOT_INSTALLED,
_("%s not installed"), pref); _("%s not installed"), pref);
remote = origin; remote = origin;
} }
/* This should have been passed in or found out above */ /* This should have been passed in or found out above */
g_assert (remote != NULL); g_assert (remote != NULL);
skipping to change at line 2944 skipping to change at line 2958
/* Note: we implement the merge when subpaths == NULL in flatpak_transaction_a dd_ref() */ /* Note: we implement the merge when subpaths == NULL in flatpak_transaction_a dd_ref() */
return flatpak_transaction_add_ref (self, NULL, decomposed, subpaths, NULL, co mmit, FLATPAK_TRANSACTION_OPERATION_UPDATE, NULL, NULL, FALSE, error); return flatpak_transaction_add_ref (self, NULL, decomposed, subpaths, NULL, co mmit, FLATPAK_TRANSACTION_OPERATION_UPDATE, NULL, NULL, FALSE, error);
} }
/** /**
* flatpak_transaction_add_uninstall: * flatpak_transaction_add_uninstall:
* @self: a #FlatpakTransaction * @self: a #FlatpakTransaction
* @ref: the ref * @ref: the ref
* @error: return location for a #GError * @error: return location for a #GError
* *
* Adds uninstalling the given ref to this transaction. * Adds uninstalling the given ref to this transaction. If the transaction is
* set to not deploy updates, the request is ignored.
* *
* Returns: %TRUE on success; %FALSE with @error set on failure. * Returns: %TRUE on success; %FALSE with @error set on failure.
*/ */
gboolean gboolean
flatpak_transaction_add_uninstall (FlatpakTransaction *self, flatpak_transaction_add_uninstall (FlatpakTransaction *self,
const char *ref, const char *ref,
GError **error) GError **error)
{ {
g_autoptr(FlatpakDecomposed) decomposed = NULL; g_autoptr(FlatpakDecomposed) decomposed = NULL;
skipping to change at line 4954 skipping to change at line 4969
continue; continue;
/* Don't uninstall refs that were already unused before the transaction (u nless include_unused_uninstall_ops is set) */ /* Don't uninstall refs that were already unused before the transaction (u nless include_unused_uninstall_ops is set) */
if (old_unused_refs && if (old_unused_refs &&
g_strv_contains ((const char * const*)old_unused_refs, flatpak_decompo sed_get_ref (unused_ref))) g_strv_contains ((const char * const*)old_unused_refs, flatpak_decompo sed_get_ref (unused_ref)))
continue; continue;
origin = flatpak_dir_get_origin (priv->dir, unused_ref, NULL, NULL); origin = flatpak_dir_get_origin (priv->dir, unused_ref, NULL, NULL);
if (origin) if (origin)
{ {
if (priv->no_deploy)
{
g_info ("Skipping uninstallation of %s for no deploy transaction",
unused_ref_str);
continue;
}
/* These get added last and have no dependencies, so will run last */ /* These get added last and have no dependencies, so will run last */
uninstall_op = flatpak_transaction_add_op (self, origin, unused_ref, uninstall_op = flatpak_transaction_add_op (self, origin, unused_ref,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
FLATPAK_TRANSACTION_OPERATI ON_UNINSTALL, FLATPAK_TRANSACTION_OPERATI ON_UNINSTALL,
FALSE, NULL); FALSE, NULL);
if (uninstall_op) if (uninstall_op)
run_operation_last (uninstall_op); run_operation_last (uninstall_op);
} }
} }
 End of changes. 4 change blocks. 
1 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)