Piotr Caban : msi: Don't publish features with non positive install level.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 24 14:52:42 CDT 2014
Module: wine
Branch: master
Commit: 331c86f12450cfb4050fd194c5d70cf98821f9f4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=331c86f12450cfb4050fd194c5d70cf98821f9f4
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Jul 24 12:35:16 2014 +0200
msi: Don't publish features with non positive install level.
---
dlls/msi/action.c | 2 ++
dlls/msi/tests/package.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 4c6d6af..feb8296 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -4892,6 +4892,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
BOOL absent = FALSE;
MSIRECORD *uirow;
+ if (feature->Level <= 0) continue;
+
if (feature->Action != INSTALLSTATE_LOCAL &&
feature->Action != INSTALLSTATE_SOURCE &&
feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE;
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 043baf9..4211e8b 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -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};
static const WCHAR msifile4W[] =
{'w','i','n','e','t','e','s','t','4','-','p','a','c','k','a','g','e','.','m','s','i',0};
+ INSTALLSTATE state;
MSIHANDLE hpkg;
UINT r;
MSIHANDLE hdb;
@@ -3217,10 +3218,16 @@ static void test_states(void)
r = MsiInstallProductA(msifile, "REMOVE=ALL");
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 */
r = MsiInstallProductA(msifile2, "ADDLOCAL=ALL");
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);
ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r);
More information about the wine-cvs
mailing list