From 35c97142e298e24fa914db298d61e3bcbfa64907 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Thu, 14 Mar 2013 12:42:01 -0700 Subject: [PATCH] Bug 851141 - Use appropriate config.status for external moz.build files; r=gps --- python/mozbuild/mozbuild/frontend/reader.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/mozbuild/mozbuild/frontend/reader.py b/python/mozbuild/mozbuild/frontend/reader.py index b0d1d748b4e..c145e4db776 100644 --- a/python/mozbuild/mozbuild/frontend/reader.py +++ b/python/mozbuild/mozbuild/frontend/reader.py @@ -37,6 +37,8 @@ from mozbuild.util import ( ReadOnlyDict, ) +from mozbuild.backend.configenvironment import ConfigEnvironment + from .sandbox import ( SandboxError, SandboxExecutionError, @@ -143,6 +145,13 @@ class MozbuildSandbox(Sandbox): # subdirectory of its topobjdir. Therefore, the topobjdir of # the external source directory is the parent of our topobjdir. topobjdir = os.path.dirname(topobjdir) + + # This is suboptimal because we load the config.status multiple + # times. We should consider caching it, possibly by moving this + # code up to the reader. + config = ConfigEnvironment.from_config_status( + os.path.join(topobjdir, 'config.status')) + self.config = config break self.topsrcdir = topsrcdir