mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-05 21:41:22 -05:00
transaction: Fix error handling for related refs
This commit fixes the handling of errors from installing/updating related refs during a transaction, so that they're treated as non-fatal, and so that the operation is skipped if the primary operation fails. The current behavior is that a failure to install/update a related ref causes the whole transaction to fail, and even after a failure to install/update the primary ref the related ref install/update is attempted. I hit this error when doing an offline USB app install, when the USB repo has an older version of the runtime and the runtime's locale extension than what's in the local repo. Without this commit, the failure to update the runtime (due to it being a downgrade) is treated as a warning, but the failure to update the runtime locale is treated as an error. With this commit, the runtime update failure is still treated as a warning, and the locale update is not attempted. This is better behavior because the locale extension update (or even install) is not critical to the app install. Closes: #1979 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
ef9297a0f1
commit
5cff4500a2
@@ -1152,8 +1152,8 @@ add_related (FlatpakTransaction *self,
|
||||
(const char **) rel->subpaths,
|
||||
NULL, NULL,
|
||||
FLATPAK_TRANSACTION_OPERATION_INSTALL_OR_UPDATE);
|
||||
op->non_fatal = TRUE;
|
||||
op->fail_if_op_fails = op;
|
||||
related_op->non_fatal = TRUE;
|
||||
related_op->fail_if_op_fails = op;
|
||||
run_operation_before (op, related_op, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user