Closed Bug 1254913 Opened 10 years ago Closed 10 years ago

mozbuild includes doesn't seem able to handle symbolic links?

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: bbouvier, Unassigned)

References

Details

Attachments

(1 file)

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[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')
Blocks: 1247836
(In reply to Mike Hommey [:glandium] from comment #1) > Does this fix it: Yes it does.
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+
Attachment #8728859 - Flags: review?(gps)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: