Commit 331c86f1 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msi: Don't publish features with non positive install level.

parent 1cfee7da
...@@ -4892,6 +4892,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) ...@@ -4892,6 +4892,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
BOOL absent = FALSE; BOOL absent = FALSE;
MSIRECORD *uirow; MSIRECORD *uirow;
if (feature->Level <= 0) continue;
if (feature->Action != INSTALLSTATE_LOCAL && if (feature->Action != INSTALLSTATE_LOCAL &&
feature->Action != INSTALLSTATE_SOURCE && feature->Action != INSTALLSTATE_SOURCE &&
feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE; feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE;
......
...@@ -2689,6 +2689,7 @@ static void test_states(void) ...@@ -2689,6 +2689,7 @@ static void test_states(void)
{'w','i','n','e','t','e','s','t','3','-','p','a','c','k','a','g','e','.','m','s','i',0}; {'w','i','n','e','t','e','s','t','3','-','p','a','c','k','a','g','e','.','m','s','i',0};
static const WCHAR msifile4W[] = static const WCHAR msifile4W[] =
{'w','i','n','e','t','e','s','t','4','-','p','a','c','k','a','g','e','.','m','s','i',0}; {'w','i','n','e','t','e','s','t','4','-','p','a','c','k','a','g','e','.','m','s','i',0};
INSTALLSTATE state;
MSIHANDLE hpkg; MSIHANDLE hpkg;
UINT r; UINT r;
MSIHANDLE hdb; MSIHANDLE hdb;
...@@ -3217,10 +3218,16 @@ static void test_states(void) ...@@ -3217,10 +3218,16 @@ static void test_states(void)
r = MsiInstallProductA(msifile, "REMOVE=ALL"); r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "five");
ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state);
/* all features installed locally */ /* all features installed locally */
r = MsiInstallProductA(msifile2, "ADDLOCAL=ALL"); r = MsiInstallProductA(msifile2, "ADDLOCAL=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "five");
ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state);
r = MsiOpenDatabaseW(msifile2W, MSIDBOPEN_DIRECT, &hdb); r = MsiOpenDatabaseW(msifile2W, MSIDBOPEN_DIRECT, &hdb);
ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r); ok(r == ERROR_SUCCESS, "failed to open database: %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