Closed Bug 1254913 Opened 5 years ago Closed 5 years ago
mozbuild includes doesn't seem able to handle symbolic links?
58 bytes, text/x-review-board-request
My tree looks like this: - /code/mozilla-inbound contains a clone of the hg repository - /home/ben/mozilla/repo/ is a symbolic link to /code/mozilla-inbound - my build script runs /home/ben/mozilla/repo/js/src/configure in my build dir. What I get, since this morning (UTC+1 time): mozbuild.configure.ConfigureError: Cannot include `/code/mozilla-inbound/browser/moz.configure` because it is not in a subdirectory of `/home/ben/mozilla/repo` It was working like a charm yesterday, so I guess this is something new. Changing my build script to run /code/mozilla-inbound/js/src/configure works around the issue. Is it that mozbuild can not handle symbolic links? If so, could it?
Does this fix it: diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py index d51bb24..0d0985f 100644 --- 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),)): raise ConfigureError( 'Cannot include `%s` because it is not in a subdirectory ' 'of `%s`' % (path, mozpath.dirname(self._paths))) 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')
(In reply to Mike Hommey [:glandium] from comment #1) > Does this fix it: Yes it does.
Review commit: https://reviewboard.mozilla.org/r/39171/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/39171/
Comment on attachment 8728859 [details] MozReview Request: Bug 1254913 - Handle symbolic links in the path leading to moz.configure https://reviewboard.mozilla.org/r/39171/#review35925 Fine by me.
Attachment #8728859 - Flags: review+
You need to log in before you can comment on or make changes to this bug.