summaryrefslogtreecommitdiff
path: root/site_scons/mongo
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2020-03-06 15:25:57 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-26 20:32:42 +0000
commit3293adbef235bf86c6efd2c2b47a352d48d8434e (patch)
treef103eb1bb44a25528b6e920de731a740c9c9964b /site_scons/mongo
parentd449f5ed8dadc77f90163fde0cbd103f0fbb4073 (diff)
downloadmongo-3293adbef235bf86c6efd2c2b47a352d48d8434e.tar.gz
SERVER-46763 structure the VersionInfoInterface tuples
(cherry picked from commit 157f1221f6e2d896fb5968714d84b3da52eab504)
Diffstat (limited to 'site_scons/mongo')
-rw-r--r--site_scons/mongo/generators.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/site_scons/mongo/generators.py b/site_scons/mongo/generators.py
index b60c1fa3b00..e2b401a5eae 100644
--- a/site_scons/mongo/generators.py
+++ b/site_scons/mongo/generators.py
@@ -4,17 +4,17 @@ import hashlib
# Default and alternative generator definitions go here.
-# This is the tuple that will be returned by the buildInfo command and
+# This is the key/value mapping that will be returned by the buildInfo command and
# printed by the --version command-line option to mongod.
-# Each tuple consists of:
-# key (string)
-# value (string)
-# should be included in buildInfo output (bool)
-# should be included in --version output (bool)
-# The values will be passed through env.subst, so you can use any SCons variables you
+# Each mapped value is in turn a dict consisting of:
+# key: <string>
+# value: <string>
+# inBuildInfo: <bool> : should it be included in buildInfo output
+# inVersion: <bool> : should it be included in --version output
+# The `value` field will be passed through env.subst, so you can use any SCons variables you
# want to define them.
def default_buildinfo_environment_data():
- return (
+ data = (
(
'distmod',
'$MONGO_DISTMOD',
@@ -76,12 +76,16 @@ def default_buildinfo_environment_data():
False,
),
)
+ return {
+ k:{'key': k, 'value': v, 'inBuildInfo': ibi, 'inVersion': iv}
+ for k, v, ibi, iv in data
+ }
# If you want buildInfo and --version to be relatively empty, set
# MONGO_BUILDINFO_ENVIRONMENT_DATA = empty_buildinfo_environment_data()
def empty_buildinfo_environment_data():
- return ()
+ return {}
def default_variant_dir_generator(target, source, env, for_signature):