summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-04-14 12:27:34 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-04-14 12:27:34 +0000
commit81b85f542cd3c93a1bab1157bf094bd944d85035 (patch)
tree8d1f92f76bef01823ec2d15f4a07a70ae74b490e
parentd296e539348a568ef4562bcbd3be5952b9355b26 (diff)
downloadmorph-sam/log-env-in-build-log.tar.gz
WIP: Log env in build logssam/log-env-in-build-log
-rw-r--r--morphlib/builder.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 0bb21434..3f1fd0f8 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -338,6 +338,7 @@ class ChunkBuilder(BuilderBase):
('install', False),
('post-install', False),
]
+
for step, in_parallel in steps:
with self.build_watch(step):
key = '%s-commands' % step
@@ -359,6 +360,10 @@ class ChunkBuilder(BuilderBase):
try:
with open(logfilepath, 'a') as log:
log.write('# # %s\n' % cmd)
+ env = extra_env
+ env.update(self.staging_area.env)
+ for key, value in env.iteritems():
+ log.write('# # %s=%s\n' % (key, value))
# flushing is needed because writes from python and
# writes from being the output in Popen have different