Commit 30c957b9 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msi: Fix installations with only INSTALLSTATE_SOURCE features.

parent 02c35582
...@@ -4315,7 +4315,7 @@ static BOOL msi_check_publish(MSIPACKAGE *package) ...@@ -4315,7 +4315,7 @@ static BOOL msi_check_publish(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry) LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry)
{ {
feature->Action = msi_get_feature_action( package, feature ); feature->Action = msi_get_feature_action( package, feature );
if (feature->Action == INSTALLSTATE_LOCAL) if (feature->Action == INSTALLSTATE_LOCAL || feature->Action == INSTALLSTATE_SOURCE)
return TRUE; return TRUE;
} }
...@@ -5358,7 +5358,7 @@ static BOOL is_full_uninstall( MSIPACKAGE *package ) ...@@ -5358,7 +5358,7 @@ static BOOL is_full_uninstall( MSIPACKAGE *package )
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) 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, ',' ); features = msi_split_string( remove, ',' );
......
...@@ -3654,6 +3654,21 @@ static void test_states(void) ...@@ -3654,6 +3654,21 @@ static void test_states(void)
MsiCloseHandle(hpkg); 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 */ /* uninstall the product */
r = MsiInstallProductA(msifile4, "REMOVE=ALL"); r = MsiInstallProductA(msifile4, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment