Repository navigation
The browser's install step takes the build's Python package source, so mach makes no virtualenv of its own offline - #517
Merged
Conversation
./mach install ran without MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none, which the build step sets. Left unset, mach makes virtualenvs of its own and runs pip for its optional packages, in a chroot with no network: it carries on when they fail, but the step's environment was not the build's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
s_browser_firefoxruns./mach buildwithMACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none, but runs./mach installwithout it. In ESR 153'spython/mach/mach/site.py,SitePackagesSource.for_mach()falls back topipwhen the variable,MACH_USE_SYSTEM_PYTHONandMOZ_AUTOMATIONare all unset. Withpip:python -m venv --without-pip).commonsite, whichinstallruns in, withpopulate_with_pip. The site's metadata no longer matches the one the build recorded.The chroot has no network.
install_optional_packagescatches each failed pip run and continues, and neither site has a required PyPI package, so the install should still succeed. Even so, the one step after a three-hour build ran in an environment that differs from the build's and reached for the network.What changed
./mach installgets the sameMACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=noneas the build, with a comment saying why.How checked
python/mach/mach/site.py(for_mach,MachSiteManager,CommandSiteManager.from_environment,_create_venv_with_pthfile,install_optional_packages) andpython/sites/{mach,build,common}.txtatFIREFOX_153_5_0esr_RELEASE. Theinstallcommand inpython/mozbuild/mozbuild/mach_commands.pynames no site, so it runs incommon.venv(build/recipes/python.shremoves only the test suite, idlelib, tkinter and turtledemo), so this fixes no outright failure.bash -npasses.git merge-treewith Firefox is built with Node.js's release build, a layer no zone gets #516 (browser-nodejs) is clean.