This (effectively) reverts commit 86bc556f9fd4a964cbaa66bc1fd67e4603ecd450.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/custom.c | 19 ++++++++++++++++++- dlls/msi/tests/install.c | 1 + 2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 2570fe2..f67a7dd 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -1132,6 +1132,23 @@ static UINT HANDLE_CustomType53_54( MSIPACKAGE *package, const WCHAR *source, co return wait_thread_handle( info ); }
+static BOOL action_type_matches_script( UINT type, UINT script ) +{ + switch (script) + { + case SCRIPT_NONE: + case SCRIPT_INSTALL: + return !(type & msidbCustomActionTypeCommit) && !(type & msidbCustomActionTypeRollback); + case SCRIPT_COMMIT: + return (type & msidbCustomActionTypeCommit); + case SCRIPT_ROLLBACK: + return (type & msidbCustomActionTypeRollback); + default: + ERR("unhandled script %u\n", script); + } + return FALSE; +} + static UINT defer_custom_action( MSIPACKAGE *package, const WCHAR *action, UINT type ) { WCHAR *actiondata = msi_dup_property( package->db, action ); @@ -1209,7 +1226,7 @@ UINT ACTION_CustomAction( MSIPACKAGE *package, LPCWSTR action ) if (type & msidbCustomActionTypeNoImpersonate) WARN("msidbCustomActionTypeNoImpersonate not handled\n");
- if (package->script == SCRIPT_NONE) + if (!action_type_matches_script( type, package->script )) { rc = defer_custom_action( package, action, type ); goto end; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 4fedc99..0cc9f9a 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -6056,6 +6056,7 @@ static void test_deferred_action(void) skip("Not enough rights to perform tests\n"); goto error; } +todo_wine ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
error:
Am 2017-12-21 um 08:12 schrieb Zebediah Figura:
This (effectively) reverts commit 86bc556f9fd4a964cbaa66bc1fd67e4603ecd450.
For a revert it would be nice to know what was wrong with the change and why reverting it is the best choice.
I guess this is for bug 44036, and the reason why you revert it instead of going for the proper fix you mentioned in comment 7 is time pressure for Wine 3.0.
On 12/21/2017 03:41 AM, Stefan Dösinger wrote:
Am 2017-12-21 um 08:12 schrieb Zebediah Figura:
This (effectively) reverts commit 86bc556f9fd4a964cbaa66bc1fd67e4603ecd450.
For a revert it would be nice to know what was wrong with the change and why reverting it is the best choice.
I guess this is for bug 44036, and the reason why you revert it instead of going for the proper fix you mentioned in comment 7 is time pressure for Wine 3.0.
Yes, that is correct. My apologies for not being clear.