Bug 1428608: Don't guess that paths might be in EXTERNAL_SOURCE_DIR; r?Build
MozReview-Commit-ID: 92JnwZsxEAW
--- 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.