-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatpakTransaction end-of-lifed-with-rebase API improvement #3991
Comments
It is also possibly an issue that there's no way to abort the transaction in case of errors here. Perhaps that could be desirable. |
In case the second of these two fails, the first will still have been added to the transaction. And since it's better to install the renamed app but not uninstall the old one, than to uninstall the old one but not install the new one, swap the order. See also flatpak#3991
In case the second of these two fails, the first will still have been added to the transaction. And since it's better to install the renamed app but not uninstall the old one, than to uninstall the old one but not install the new one, swap the order. See also #3991
I’ve just been looking into this, and can reproduce it:
if ((op->kind == FLATPAK_TRANSACTION_OPERATION_INSTALL_OR_UPDATE ||
op->kind == FLATPAK_TRANSACTION_OPERATION_INSTALL) &&
g_str_equal (pref, "app.drey.Dialect/x86_64/stable"))
{
g_set_error (&local_error, FLATPAK_ERROR, FLATPAK_ERROR_OUT_OF_SPACE, "er ner, out of space");
res = FALSE;
}
You’ll be left with It’s not possible to work around this in the I agree with @mwleeds that the fix here is to add a new I’ll look into implementing that now. |
This always struck me as an odd API anyway; basically a signal that requires you to copy/paste code rather than like... return TRUE if you want to "do the thing". |
This will be used in the next commit to simplify some new code. Currently, this introduces no functional changes. Signed-off-by: Philip Withnall <[email protected]> Helps: flatpak#3991
This mostly replaces `flatpak_transaction_add_rebase()`. It’s necessary because the uninstall op for an eol-rebased app needs to be linked to the install/update op for the rebased app, otherwise one op can proceed after the other has failed (or they can be run in the wrong order) and result in the old app being uninstalled but the new one not installed. The following commit will port the internal flatpak `FlatpakTransaction` subclasses to use it. Other consumers of `FlatpakTransaction` (such as gnome-software) will have to be ported as well. Signed-off-by: Philip Withnall <[email protected]> Fixes: flatpak#3991
This fixes the possible situation where an eol-rebase app can be uninstalled and the new version not correctly installed (due to, for example, the install op failing due to a lack of disk space). Signed-off-by: Philip Withnall <[email protected]> Fixes: flatpak#3991
Yeah, the The changes in #5332 don’t preclude some other changes in future to rearrange how |
Fix available as #5332. It adds a new |
This adds a test to cover the changes in the previous commit. Helps: flatpak#3991
This mostly replaces `flatpak_transaction_add_rebase()`. It’s necessary because the uninstall op for an eol-rebased app needs to be linked to the install/update op for the rebased app, otherwise one op can proceed after the other has failed (or they can be run in the wrong order) and result in the old app being uninstalled but the new one not installed. The following commit will port the internal flatpak `FlatpakTransaction` subclasses to use it. Other consumers of `FlatpakTransaction` (such as gnome-software) will have to be ported as well. Signed-off-by: Philip Withnall <[email protected]> Fixes: flatpak#3991
This fixes the possible situation where an eol-rebase app can be uninstalled and the new version not correctly installed (due to, for example, the install op failing due to a lack of disk space). Signed-off-by: Philip Withnall <[email protected]> Fixes: flatpak#3991
This adds a test to cover the changes in the previous commit. Helps: flatpak#3991
This will be used in the next commit to simplify some new code. Currently, this introduces no functional changes. Signed-off-by: Philip Withnall <[email protected]> Helps: #3991
This mostly replaces `flatpak_transaction_add_rebase()`. It’s necessary because the uninstall op for an eol-rebased app needs to be linked to the install/update op for the rebased app, otherwise one op can proceed after the other has failed (or they can be run in the wrong order) and result in the old app being uninstalled but the new one not installed. The following commit will port the internal flatpak `FlatpakTransaction` subclasses to use it. Other consumers of `FlatpakTransaction` (such as gnome-software) will have to be ported as well. Signed-off-by: Philip Withnall <[email protected]> Fixes: #3991
This fixes the possible situation where an eol-rebase app can be uninstalled and the new version not correctly installed (due to, for example, the install op failing due to a lack of disk space). Signed-off-by: Philip Withnall <[email protected]> Fixes: #3991
This adds a test to cover the changes in the previous commit. Helps: #3991
Currently, when a
FlatpakTransaction
emits aend-of-lifed-with-rebase
signal, the signal handler is expected to executeflatpak_transaction_add_uninstall()
andflatpak_transaction_add_rebase()
. However, as pointed out here, this isn't ideal because what you really want is to uninstall the old ref and rebase to the new one atomically, not potentially be in a situation where you do one but not the other (though rebasing without uninstalling is not as bad as uninstalling without rebasing).So perhaps we need a way to remove something from the transaction, or a combined "uninstall and rebase" function.
The text was updated successfully, but these errors were encountered: