msi [1/2]: A feature state of INSTALLSTATE_ABSENT translates into a component state of INSTALLSTATE_UNKNOWN

James Hawkins truiken at gmail.com
Wed Sep 27 21:36:16 CDT 2006


Hi,

Changelog:
* Follow state resolution rules when a feature parent saves a component.

 dlls/msi/helpers.c       |    5 ++++-
 dlls/msi/tests/package.c |   15 +++------------
 2 files changed, 7 insertions(+), 13 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index dbca4f3..d1664bf 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -849,6 +849,9 @@ void ACTION_UpdateComponentStates(MSIPAC
 
     newstate = feature->ActionRequest;
 
+    if (newstate == INSTALLSTATE_ABSENT)
+        newstate = INSTALLSTATE_UNKNOWN;
+
     LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
     {
         MSICOMPONENT* component = cl->component;
@@ -879,7 +882,7 @@ void ACTION_UpdateComponentStates(MSIPAC
                 if ( f->ActionRequest != INSTALLSTATE_LOCAL &&
                      f->ActionRequest != INSTALLSTATE_SOURCE )
                 {
-                    break;
+                    continue;
                 }
 
                 LIST_FOR_EACH_ENTRY( clist, &f->Components, ComponentList, entry )
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index abf996f..5ed8b5b 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -2667,30 +2667,21 @@ static void test_featureparents(void)
     r = MsiGetComponentState(hpkg, "canis", &state, &action);
     ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
     ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
-    todo_wine
-    {
-        ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
-    }
+    ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
 
     state = 0xdeadbee;
     action = 0xdeadbee;
     r = MsiGetComponentState(hpkg, "monoceros", &state, &action);
     ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
     ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
-    todo_wine
-    {
-        ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
-    }
+    ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
 
     state = 0xdeadbee;
     action = 0xdeadbee;
     r = MsiGetComponentState(hpkg, "lepus", &state, &action);
     ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
     ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
-    todo_wine
-    {
-        ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
-    }
+    ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
 
     state = 0xdeadbee;
     action = 0xdeadbee;
-- 
1.4.2.1


More information about the wine-patches mailing list