James Hawkins : msi:
INSTALLSTATE_SOURCE also overrides a parent feature state change to
INSTALLSTATE_ABSENT .
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 20 05:33:53 CDT 2006
Module: wine
Branch: master
Commit: 6518f3d7f2515b52a9c0d2f8a757998b41bd2ead
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=6518f3d7f2515b52a9c0d2f8a757998b41bd2ead
Author: James Hawkins <truiken at gmail.com>
Date: Fri Sep 15 17:10:01 2006 -0700
msi: INSTALLSTATE_SOURCE also overrides a parent feature state change to INSTALLSTATE_ABSENT.
---
dlls/msi/helpers.c | 19 ++++++++++---------
dlls/msi/tests/package.c | 8 ++++----
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index 45d3ebe..8c957a2 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -869,20 +869,21 @@ void ACTION_UpdateComponentStates(MSIPAC
/*if any other feature wants is local we need to set it local*/
LIST_FOR_EACH_ENTRY( f, &package->features, MSIFEATURE, entry )
{
- if ( component->ActionRequest != INSTALLSTATE_LOCAL )
+ if ( f->ActionRequest != INSTALLSTATE_LOCAL &&
+ f->ActionRequest != INSTALLSTATE_SOURCE )
+ {
break;
+ }
LIST_FOR_EACH_ENTRY( clist, &f->Components, ComponentList, entry )
{
- if ( clist->component == component )
+ if ( clist->component == component &&
+ (f->ActionRequest == INSTALLSTATE_LOCAL ||
+ f->ActionRequest == INSTALLSTATE_SOURCE) )
{
- if (f->ActionRequest == INSTALLSTATE_LOCAL)
- {
- TRACE("Saved by %s\n", debugstr_w(f->Feature));
- component->ActionRequest = INSTALLSTATE_LOCAL;
- component->Action = INSTALLSTATE_LOCAL;
- }
- break;
+ TRACE("Saved by %s\n", debugstr_w(f->Feature));
+ component->ActionRequest = f->ActionRequest;
+ component->Action = f->ActionRequest;
}
}
}
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index f5ff39c..e07f86a 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -2638,8 +2638,8 @@ static void test_featureparents(void)
todo_wine
{
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
}
+ ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
@@ -2658,8 +2658,8 @@ static void test_featureparents(void)
todo_wine
{
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
}
+ ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
@@ -2678,8 +2678,8 @@ static void test_featureparents(void)
todo_wine
{
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
}
+ ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
@@ -2688,8 +2688,8 @@ static void test_featureparents(void)
todo_wine
{
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
}
+ ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
More information about the wine-cvs
mailing list