msi: Only set the action to source if the component has a local feature.
This commit is contained in:
parent
3807a91739
commit
9288055beb
|
@ -33,6 +33,7 @@
|
|||
#include "objidl.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#define MSI_DATASIZEMASK 0x00ff
|
||||
#define MSITYPE_VALID 0x0100
|
||||
|
@ -912,16 +913,16 @@ static inline void msi_component_set_state( MSICOMPONENT *comp, INSTALLSTATE sta
|
|||
}
|
||||
else if (state == INSTALLSTATE_SOURCE)
|
||||
{
|
||||
switch (comp->Installed)
|
||||
if (comp->Installed == INSTALLSTATE_ABSENT ||
|
||||
(comp->Installed == INSTALLSTATE_SOURCE && comp->hasLocalFeature))
|
||||
{
|
||||
case INSTALLSTATE_ABSENT:
|
||||
case INSTALLSTATE_SOURCE:
|
||||
comp->ActionRequest = state;
|
||||
comp->Action = state;
|
||||
break;
|
||||
default:
|
||||
comp->ActionRequest = INSTALLSTATE_UNKNOWN;
|
||||
comp->Action = INSTALLSTATE_UNKNOWN;
|
||||
comp->ActionRequest = state;
|
||||
comp->Action = state;
|
||||
}
|
||||
else
|
||||
{
|
||||
comp->ActionRequest = INSTALLSTATE_UNKNOWN;
|
||||
comp->Action = INSTALLSTATE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3809,20 +3809,14 @@ static void test_states(void)
|
|||
r = MsiGetComponentState(hpkg, "epsilon", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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, "zeta", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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;
|
||||
|
@ -5251,20 +5245,14 @@ static void test_states(void)
|
|||
r = MsiGetComponentState(hpkg, "beta", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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, "gamma", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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;
|
||||
|
@ -5285,20 +5273,14 @@ static void test_states(void)
|
|||
r = MsiGetComponentState(hpkg, "epsilon", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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, "zeta", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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;
|
||||
|
@ -5333,20 +5315,14 @@ static void test_states(void)
|
|||
r = MsiGetComponentState(hpkg, "mu", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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, "nu", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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;
|
||||
|
@ -5367,20 +5343,14 @@ static void test_states(void)
|
|||
r = MsiGetComponentState(hpkg, "pi", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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, "rho", &state, &action);
|
||||
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, 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;
|
||||
|
|
Loading…
Reference in New Issue