Bug 1254913 - Handle symbolic links in the path leading to moz.configure
--- a/python/mozbuild/mozbuild/configure/__init__.py
+++ b/python/mozbuild/mozbuild/configure/__init__.py
@@ -154,17 +154,17 @@ class ConfigureSandbox(dict):
if self._paths:
path = mozpath.join(mozpath.dirname(self._paths[-1]), path)
if not mozpath.basedir(path, (mozpath.dirname(self._paths[0]),)):
raise ConfigureError(
'Cannot include `%s` because it is not in a subdirectory '
'of `%s`' % (path, mozpath.dirname(self._paths[0])))
else:
- path = mozpath.abspath(path)
+ path = mozpath.realpath(mozpath.abspath(path))
if path in self._paths:
raise ConfigureError(
'Cannot include `%s` because it was included already.' % path)
self._paths.append(path)
source = open(path, 'rb').read()
code = compile(source, path, 'exec')