Save env used on configure
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 6 Dec 2017 20:50:20 +0000 (15:50 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 14 Dec 2017 20:24:28 +0000 (15:24 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
lttng_ivc/utils/project.py

index 5111819d432ed93c75d890bfff40d7c432c91bb9..f0b7272666a6b927abe5594e9418067063307173 100644 (file)
@@ -24,6 +24,7 @@ import git
 import subprocess
 import logging
 import lttng_ivc.settings as Settings
+import pprint
 
 from lttng_ivc.utils.utils import sha256_checksum
 from lttng_ivc.utils.utils import find_dir, find_file
@@ -226,6 +227,12 @@ class Project(object):
 
         out = os.path.join(self.log_path, "configure.out")
         err = os.path.join(self.log_path, "configure.err")
+        env_file = os.path.join(self.log_path, "configure.env")
+
+        env = self.get_env()
+
+        with open(env_file, 'w') as tmp:
+            pprint.pprint(env, stream=tmp)
 
         os.chdir(self.source_path)
         args = ['./configure']
@@ -235,7 +242,7 @@ class Project(object):
 
         # TODO: log output and add INFO log point
         with open(out, 'w') as stdout, open(err, 'w') as stderr:
-            p = subprocess.run(args, env=self.get_env(), stdout=stdout,
+            p = subprocess.run(args, env=env, stdout=stdout,
                                stderr=stderr)
         p.check_returncode()
         self.isConfigured = True
This page took 0.024348 seconds and 5 git commands to generate.