Module: wine Branch: master Commit: 30c957b9ccb9a756b3dee3afcc33bdd521db60b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=30c957b9ccb9a756b3dee3afcc...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Oct 18 17:25:08 2017 +0200
msi: Fix installations with only INSTALLSTATE_SOURCE features.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msi/action.c | 4 ++-- dlls/msi/tests/package.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 915ff17..da7af06 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4315,7 +4315,7 @@ static BOOL msi_check_publish(MSIPACKAGE *package) LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry) { feature->Action = msi_get_feature_action( package, feature ); - if (feature->Action == INSTALLSTATE_LOCAL) + if (feature->Action == INSTALLSTATE_LOCAL || feature->Action == INSTALLSTATE_SOURCE) return TRUE; }
@@ -5358,7 +5358,7 @@ static BOOL is_full_uninstall( MSIPACKAGE *package )
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - if (feature->Action == INSTALLSTATE_LOCAL) ret = FALSE; + if (feature->Action == INSTALLSTATE_LOCAL || feature->Action == INSTALLSTATE_SOURCE) ret = FALSE; }
features = msi_split_string( remove, ',' ); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 78ec1cc..1f04cef 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -3654,6 +3654,21 @@ static void test_states(void)
MsiCloseHandle(hpkg);
+ /* test source only install */ + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "one"); + ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "two"); + ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state); + + r = MsiInstallProductA(msifile, "ADDSOURCE=one"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "one"); + ok(state == INSTALLSTATE_SOURCE, "state = %d\n", state); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "two"); + ok(state == INSTALLSTATE_ABSENT, "state = %d\n", state); + /* uninstall the product */ r = MsiInstallProductA(msifile4, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);