diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-04-14 12:27:34 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-04-14 12:27:34 +0000 |
commit | 81b85f542cd3c93a1bab1157bf094bd944d85035 (patch) | |
tree | 8d1f92f76bef01823ec2d15f4a07a70ae74b490e | |
parent | d296e539348a568ef4562bcbd3be5952b9355b26 (diff) | |
download | morph-sam/log-env-in-build-log.tar.gz |
WIP: Log env in build logssam/log-env-in-build-log
-rw-r--r-- | morphlib/builder.py | 5 |
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 |