summaryrefslogtreecommitdiff
path: root/src/mongo/installer
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2019-02-21 09:16:08 -0500
committerHenrik Edin <henrik.edin@mongodb.com>2019-04-05 12:02:41 -0400
commit39dba5ab553c53dfdc1e6d070c07adcfffc80ec1 (patch)
tree3114f8d497e26cfc8e8af5dbdc929be2d91a1055 /src/mongo/installer
parentaad70256024c8447344a4d7f1cfdda742d1904ee (diff)
downloadmongo-39dba5ab553c53dfdc1e6d070c07adcfffc80ec1.tar.gz
SERVER-39025 Fix feature subset installation from MSI. Missing yaml file is no longer critical.
Diffstat (limited to 'src/mongo/installer')
-rw-r--r--src/mongo/installer/msi/ca/CustomAction.cpp11
-rw-r--r--src/mongo/installer/msi/wxs/FeatureFragment.wxs27
2 files changed, 28 insertions, 10 deletions
diff --git a/src/mongo/installer/msi/ca/CustomAction.cpp b/src/mongo/installer/msi/ca/CustomAction.cpp
index df66047da1b..fc98732c0e4 100644
--- a/src/mongo/installer/msi/ca/CustomAction.cpp
+++ b/src/mongo/installer/msi/ca/CustomAction.cpp
@@ -193,6 +193,15 @@ std::string toUtf8String(MSIHANDLE hInstall, const std::wstring& wide) {
goto Exit; \
}
+#define CHECKGLE_AND_LOG_NOFAIL_EXIT(...) \
+ \
+ { \
+ LONG _gle = GetLastError(); \
+ LogMessage(hInstall, INSTALLMESSAGE_INFO, "Received GetLastError %x", _gle); \
+ LogMessage(hInstall, INSTALLMESSAGE_INFO, __VA_ARGS__); \
+ goto Exit; \
+ }
+
#define CHECKUINT_AND_LOG(x) \
\
{ \
@@ -271,7 +280,7 @@ extern "C" UINT __stdcall UpdateMongoYAML(MSIHANDLE hInstall) {
long gle = GetFileAttributesW(YamlFile.c_str());
if (gle == INVALID_FILE_ATTRIBUTES) {
- CHECKGLE_AND_LOG("Failed to find yaml file");
+ CHECKGLE_AND_LOG_NOFAIL_EXIT("Failed to find yaml file");
}
HANDLE hFile = CreateFileW(YamlFile.c_str(),
diff --git a/src/mongo/installer/msi/wxs/FeatureFragment.wxs b/src/mongo/installer/msi/wxs/FeatureFragment.wxs
index 5cf8622df20..d5454248ab7 100644
--- a/src/mongo/installer/msi/wxs/FeatureFragment.wxs
+++ b/src/mongo/installer/msi/wxs/FeatureFragment.wxs
@@ -20,15 +20,6 @@
Title ="Server"
Description="The MongoDB server (mongod)"
Level ="1">
- <ComponentRef Id="c_mongodPdb"/>
- <ComponentRef Id="c_mongodCfg"/>
-
- <?if $(var.Edition) = Enterprise ?>
- <ComponentGroupRef Id="cg_EnterpriseServer" />
- <?endif ?>
- <?if $(var.Edition) = SSL ?>
- <ComponentGroupRef Id="cg_SSLBase" />
- <?endif ?>
</Feature>
<Feature Id="ServerNoService"
Title ="ServerNoService"
@@ -36,6 +27,15 @@
Display="hidden"
Level ="32767">
<ComponentRef Id="c_mongod"/>
+ <ComponentRef Id="c_mongodPdb"/>
+ <ComponentRef Id="c_mongodCfg"/>
+
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseServer" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
</Feature>
<Feature Id="ServerService"
Title ="ServerService"
@@ -46,6 +46,15 @@
<ComponentRef Id="c_mongodWithServiceUser" />
<ComponentRef Id="c_MONGO_DATA_PATH"/>
<ComponentRef Id="c_MONGO_LOG_PATH"/>
+ <ComponentRef Id="c_mongodPdb"/>
+ <ComponentRef Id="c_mongodCfg"/>
+
+ <?if $(var.Edition) = Enterprise ?>
+ <ComponentGroupRef Id="cg_EnterpriseServer" />
+ <?endif ?>
+ <?if $(var.Edition) = SSL ?>
+ <ComponentGroupRef Id="cg_SSLBase" />
+ <?endif ?>
</Feature>
<Feature Id="Client"
Title ="Client"