Closed Bug 1739177 Opened 4 years ago Closed 4 years ago

create-mach-environment fails when it cannot form a relative path to site-packages

Categories

(Firefox Build System :: Mach Core, defect)

Unspecified
Windows
defect

Tracking

(firefox-esr91 unaffected, firefox93 unaffected, firefox94 unaffected, firefox95 unaffected, firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox93 --- unaffected
firefox94 --- unaffected
firefox95 --- unaffected
firefox96 --- fixed

People

(Reporter: molly, Assigned: mhentges)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

create-mach-environment is failing for me with the following error:

ValueError: path is on mount 'h:', start on mount 'c:'

  File "h:\mozilla\mozilla-central\python/mozbuild/mozbuild/mach_commands.py", line 2481, in create_mach_environment
    manager.build()
  File "h:\mozilla\mozilla-central\python\mach\mach\virtualenv.py", line 325, in build
    f.write("{}\n".format(os.path.relpath(path, site_packages_dir)))
  File "g:\mozilla-build\python3\lib\ntpath.py", line 562, in relpath
    path_drive, start_drive))

virtualenv.py:325 appears to be trying to form a relative path from within the source tree to the virtualenv's site-packages directory, but I have those things on separate drives, so a relative path between them does not exist. This has made me effectively unable to use mach at all.

Assignee: nobody → mhentges

There were a bunch of locations where we were doing path shenanigans
with requirements.pth/.vendored items.

There was a bit of complexity because we were specifically making each
pthfile line be a relative path to support moving the Firefox
topsrcdir without causing issues.

However, now that we're more intelligent about checking if pthfile
lines are up-to-date (and since moving your topsrcdir will still require
re-generating the Mach virtualenv), this behaviour became less useful.

So, generalize MachEnvRequirements -> "sys.path lines" logic and
reuse it everywhere.

Molly can you try moz-phab patch --apply-to=here D129693 and see if it resolves the issue for you?

Flags: needinfo?(mhowell)

That does seem to have done the trick, yeah; everything seems to be working normally now. Thanks for jumping on this so quick!

Flags: needinfo?(mhowell)
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/59d1baf2a83f Add `requirements.pths_as_absolute()` r=ahal
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: