diff --git a/SConstruct b/SConstruct index 85465905559..c23a19762fb 100644 --- a/SConstruct +++ b/SConstruct @@ -2370,7 +2370,17 @@ env.AlwaysBuild( "lint" ) def getSystemInstallName(): dist_arch = GetOption("distarch") arch_name = env['TARGET_ARCH'] if not dist_arch else dist_arch - n = env.GetTargetOSName() + "-" + arch_name + + # We need to make sure the directory names inside dist tarballs are permanently + # consistent, even if the target OS name used in scons is different. Any differences + # between the names used by env.TargetOSIs/env.GetTargetOSName should be added + # to the translation dictionary below. + os_name_translations = { + 'windows': 'win32' + } + os_name = env.GetTargetOSName() + os_name = os_name_translations.get(os_name, os_name) + n = os_name + "-" + arch_name if len(mongo_modules): n += "-" + "-".join(m.name for m in mongo_modules)