Index: recipes.py |
diff --git a/recipes.py b/recipes.py |
index a94dd77747cbd257f94989a14a88b1dee6757caf..61496b3c12898e78dfc17bb335915d62c33d4a21 100755 |
--- a/recipes.py |
+++ b/recipes.py |
@@ -146,6 +146,14 @@ def run(package_deps, args, op_args): |
properties['recipe'] = args.recipe |
+ # TODO(iannucci): A much better way to do this would be to dynamically |
+ # detect if the mirrors are actually available during the execution of the |
+ # recipe. |
+ if ('use_mirror' not in properties and ( |
+ 'TESTING_MASTERNAME' in os.environ or |
+ 'TESTING_SLAVENAME' in os.environ)): |
+ properties['use_mirror'] = False |
+ |
os.environ['PYTHONUNBUFFERED'] = '1' |
os.environ['PYTHONIOENCODING'] = 'UTF-8' |
@@ -163,6 +171,9 @@ def run(package_deps, args, op_args): |
old_cwd = os.getcwd() |
os.chdir(workdir) |
+ # Generate our Runtime instance. |
+ rt = recipe_run.Runtime(properties) |
+ |
# Construct our stream engines. We may want to share stream events with more |
# than one StreamEngine implementation, so we will accumulate them in a |
# "stream_engines" list and compose them into a MultiStreamEngine. |
@@ -199,7 +210,7 @@ def run(package_deps, args, op_args): |
try: |
ret = recipe_run.run_steps( |
- properties, stream_engine, |
+ rt, stream_engine, |
step_runner.SubprocessStepRunner(stream_engine), |
universe_view=universe_view) |
finally: |