From 81b85f542cd3c93a1bab1157bf094bd944d85035 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 14 Apr 2015 12:27:34 +0000 Subject: WIP: Log env in build logs --- morphlib/builder.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.1