Bug 1254913 - Handle symbolic links in the path leading to moz.configure. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 10 Mar 2016 15:49:14 +0900
changeset 288192 b8b72c9bfc6ddaca27f2ef4db1b6b58bdfdf6440
parent 288191 48286284fa92ecab0c87cc331300bb1566f32f9e
child 288193 e83eb1ba4b838f8f8b8de3d1875421f4daec1613
push id30075
push usercbook@mozilla.com
push dateFri, 11 Mar 2016 15:51:11 +0000
treeherdermozilla-central@f907faa919be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1254913
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1254913 - Handle symbolic links in the path leading to moz.configure. r=nalexander
python/mozbuild/mozbuild/configure/__init__.py
--- 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')