Bug 1428608: Don't guess that paths might be in EXTERNAL_SOURCE_DIR; r?Build draft
authorTom Prince <mozilla@hocat.ca>
Sun, 07 Jan 2018 20:42:10 -0700
changeset 717049 20b49adae05720d95c62ffb5905e7b64205fd56e
parent 717048 741a6d79b8ac779175803023d61b43ab5bbde05a
child 745131 2bbeeff2bb3df8fedc66ba39e1b05c6aeaecef00
push id94541
push userbmo:mozilla@hocat.ca
push dateMon, 08 Jan 2018 03:54:49 +0000
reviewersBuild
bugs1428608
milestone59.0a1
Bug 1428608: Don't guess that paths might be in EXTERNAL_SOURCE_DIR; r?Build MozReview-Commit-ID: 92JnwZsxEAW
python/mozbuild/mozbuild/frontend/context.py
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -653,25 +653,18 @@ class SourcePath(Path):
     def __init__(self, context, value):
         if value.startswith('!'):
             raise ValueError('Object directory paths are not allowed')
         if value.startswith('%'):
             raise ValueError('Filesystem absolute paths are not allowed')
         super(SourcePath, self).__init__(context, value)
 
         if value.startswith('/'):
-            path = None
-            # If the path starts with a '/' and is actually relative to an
-            # external source dir, use that as base instead of topsrcdir.
-            if context.config.external_source_dir:
-                path = mozpath.join(context.config.external_source_dir,
-                                    value[1:])
-            if not path or not os.path.exists(path):
-                path = mozpath.join(context.config.topsrcdir,
-                                    value[1:])
+            path = mozpath.join(context.config.topsrcdir,
+                                value[1:])
         else:
             path = mozpath.join(self.srcdir, value)
         self.full_path = mozpath.normpath(path)
 
     @memoized_property
     def translated(self):
         """Returns the corresponding path in the objdir.