James Hawkins : msi: Only unpublish the features if the entire product is being uninstalled.
Alexandre Julliard
julliard at winehq.org
Thu Nov 1 07:39:47 CDT 2007
Module: wine
Branch: master
Commit: ccdf578ba264bd8f522fc03188064b57003d220a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ccdf578ba264bd8f522fc03188064b57003d220a
Author: James Hawkins <truiken at gmail.com>
Date: Thu Nov 1 03:14:18 2007 -0500
msi: Only unpublish the features if the entire product is being uninstalled.
---
dlls/msi/action.c | 15 ++++++++++++++-
dlls/msi/tests/install.c | 10 ++--------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index ca46448..9560c4e 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3754,11 +3754,24 @@ static UINT msi_unpublish_feature(MSIPACKAGE *package, MSIFEATURE *feature)
return ERROR_SUCCESS;
}
+static BOOL msi_check_unpublish(MSIPACKAGE *package)
+{
+ MSIFEATURE *feature;
+
+ LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry)
+ {
+ if (feature->ActionRequest != INSTALLSTATE_ABSENT)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package)
{
MSIFEATURE *feature;
- if (msi_check_publish(package))
+ if (!msi_check_unpublish(package))
return ERROR_SUCCESS;
LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index a93b66b..6ac44f1 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2169,16 +2169,10 @@ static void test_publish(void)
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
- todo_wine
- {
- ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- }
+ ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
- todo_wine
- {
- ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- }
+ ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
More information about the wine-cvs
mailing list