This passes `python3 -mcompileall`. Changes:
* use `0o` prefix for octal literals
* print as a function
* except .. as
* use six.reraise to replace a multi-argument raise statement
* use six.string_types and six.moves.configparser
* remove uses of `L` suffix for long integers
MozReview-Commit-ID: KLaYRNHGpay
--HG--
extra : rebase_source : 6ca1b5447cd28eff8d9f2805add6a0f07e8b4c63
We correctly worked around problems for `hg pull` but not for
`hg update`. Make the workaround consistent.
MozReview-Commit-ID: 7A4dgANO0ip
--HG--
extra : rebase_source : fd4b90200ab3ce07a3921a02ae28f5a7a0c3d83c
Hacky, but it works -- until Google updates its license hashes. This
looks ahead to using |mach bootstrap| to build docker images.
MozReview-Commit-ID: DF23v8tr8SW
--HG--
extra : rebase_source : 5a80bdd5ddfb551b374464f42c3783fef5a71fc3
This looks ahead to using |mach bootstrap| when building docker
images.
MozReview-Commit-ID: LoMU7ji5T0x
--HG--
extra : rebase_source : 2885195855497d69b1cbba02a943964dd3286b93
This was a regression introduced in Bug 1344244. Google changed the
layout of their packages. It used to be that the Android SDK archive
had a top-level 'android-sdk-$OS_NAME' directory; that's no longer the
case. It would be cleaner to unpack to 'android-sdk' without the OS
name, but that complicates the logic that detects existing installs.
MozReview-Commit-ID: 4B2Rt1AM2ky
--HG--
extra : rebase_source : 3cd1fef88cbb47fc9cd4e47a2a4bc2277c576c58
Consider Rust toolchains prior to 1.19.0 old enough to update
by the `mach bootstrap` command, in preparation for requiring
that release during Firefox 57 nightly development.
MozReview-Commit-ID: JaaM3sPDmzn
--HG--
extra : rebase_source : 3835103a822cfc05bde92ee920b344fe7b68d61c
There's no need to install the caskroom bits for Homebrew now,
allowing to fix Java installation on Mac OS X and simplify the code at
the same time.
MozReview-Commit-ID: 1Ssjm4YRrPQ
--HG--
extra : rebase_source : 3414d1fbe2bdb693cae1f5b1379d8d9335f1e7f4
This is the real fix. Google has replaced the |android --no-ui ...|
tool with a simpler |sdkmanager| tool, which makes it easier to
install packages with particular major versions. (Minor versions
still can't be controlled; for example, the m2repository extras are
constantly rolling forward.)
|sdkmanager| fails if the required packages aren't installed and can't
be installed, so there's no need to search for missing packages, etc,
simplifying the code considerably.
I don't see an easy way to upgrade outdated Android SDK installations
-- it's not clear that unpacking over top of an existing SDK
installation succeeds -- so I've included a message about moving or
removing outdated installations. This will punish folks who have
added additional Android platforms, or download emulator images using
the Android toolchain (but not those downloaded using |mach
emulator|). C'est la vie.
MozReview-Commit-ID: GLhKyuq701k
--HG--
extra : rebase_source : 26578c5ef4dcc6a29809630add2232a98407ec54
This refactoring unifies similar code that has been copy-pasted and
subsequently diverged.
MozReview-Commit-ID: EuVQBR4gsDo
--HG--
extra : rebase_source : bda66ef9001a1cddf75417aaeebd9dcecd05a6b7
With configure now being able to auto-detect the presence of a `mach
bootstrap`-installed clang and libclang and the upcoming
build-by-defaultness of Stylo, we can start downloading these packages
all the time.
LLVM/clang is needed for Stylo's bindgen, and Apple's clang is unusable
for such purposes. For other platforms, we have installed LLVM/clang
from our tooltool archive on the supposition that those packages are
definitely known to work, as we use said packages in automation. For
Mac, however, we haven't been able to generate packages for tooltool
that successfully build Stylo, and even if we had, those packages would
solely be used for developer builds of Stylo and would not be used in
automation. The case for downloading LLVM/clang for Mac from tooltool,
therefore, is not as strong as for other platforms.
As a result, we'll rely on the installed package manager for LLVM/clang,
which many people may have installed anyway.
In passing, also delete some old code for OS X versions < 10.7; such
platforms are no longer supported for running or building Firefox.
When determining the path of a possible mozilla-central checkout,
bootstrap currently considers the existence of a `.git` directory as
sufficient proof that the containing directory is a git checkout.
Unfortunately, if you happen to execute standalone bootstrap from a git
checkout of something else, you're gonna have a bad time.
To prevent this, check for the existence of a moz.configure file. This
is not an ideal proof, but it is better than what we currently have.
Bump the target version and checksums for the rustup installers
we use for the latest release so reduce the variance with manual
installs.
MozReview-Commit-ID: E5O4UOu1wLr
--HG--
extra : rebase_source : a0745515957667787929bc5df05a66adb29cbd66
libGL package was consolidated into mesa-libs but quarterly set still
uses the old name. Since gtk3 (via libepoxy) and gtk2 (via cairo)
already indirectly depend on mesa-libs take advantage of it to avoid
churn on updates.
MozReview-Commit-ID: F5LBOOthAMc
--HG--
extra : rebase_source : 4e3e30e817187c3ffef30e280554b12b02f44568
This version offers a 15-20% improvement to compilation
speed, so we will likely require it for developers soon.
Begin installing it now to reduce the frequence of double
migrations.
MozReview-Commit-ID: JZRssgOjkF7
--HG--
extra : rebase_source : 7d2ef10315c570e21d609f713391be3e82a88383
We install the tooltool packages to ${HOME}/.mozbuild by default, and
${HOME} may have spaces on Windows. The arguments to the command-line
options need to be quoted appropriately.
DONTBUILD because NPOTB
We'll need this information to be able to locate mach later, since we
can't assume that mach is just several directories above the script
we're currently running.
If we're running bootstrap from inside a mozilla-central checkout, we'll
have all the necessary files that we need to install tooltool packages
via `mach artifact toolchain`. If we're running bootstrap from a
downloaded bootstrap.py, however, it's possible that we failed to clone
the repository. We need to account for that situation and provide
instructions on how to deal with it.
A consequence of these two mechanisms for bootstrap is that we'll have
to make sure we're invoking `mach artifact toolchain` correctly in both
cases, which we'll handle in subsequent commits.
Now that we're installing Stylo packages through `mach`, we need to have
`mach` available, which is only true after we've checked for a clone of
the tree. We move the block performing the installation in this commit
and then fixup resulting problems in future commits.
Using this command is more robust than our current method, and brings
several benefits, such as smart caching of the downloaded toolchain. We
change the clang package downloaded for Windows with this change, but
bindgen has been updated to work well with LLVM 5.0, so there should be
no problems.
The base bootstrap class has code to conditionally upgrade Mercurial
depending on its version. It is kinda broken. This commit overrides
that code in the MozillaBuild bootstrapper to always run `pip`, which
will ensure the latest stable Mercurial release is installed.
MozReview-Commit-ID: 2O1Ff7dAp4o
--HG--
extra : rebase_source : 98cba0abbebf13e8fe93673d5b46eb16e6a3c147
Previously, `mach bootstrap` would unconditionally prompt to help
configure Mercurial in most scenarios. I agree with Ehsan's observation
in a mailing list post that this behavior doesn't make sense when
running from a Git checkout, as the user probably doesn't care about
Mercurial if they are using Git.
This change doesn't completely ignore Mercurial for Git users. For
example, we still unconditionally run code that verifies that Mercurial
is installed and reasonably up to date. Changing this would be a bit
of work. But even if we wanted to change it, git-cinnabar users
would benefit from having a modern Mercurial installed. So it isn't
straightforward for Git users to ignore Mercurial completely.
MozReview-Commit-ID: 8ncHRgCsjz
--HG--
extra : rebase_source : 7945e3bf3d5283105bac517885f794fc5d7bba6d
Fixes a 403 error running `./mach bootstrap` with stylo enabled.
Bug 1359968 updated the tooltool manifests to point to a
publicly-available clang package. Update the macOS hash
used by mozboot to install the same package for local
use by developers who need rust-bindgen.
MozReview-Commit-ID: FtkATaLwc7n
--HG--
extra : rebase_source : 61390c729e694589b0351026aac0263440a9a3c5
The Python print() function's does not take a format string, so the extraneous %s here inadvertently prints "Downloading clang package from %s https://..." instead of "Downloading clang package from https://...".
MozReview-Commit-ID: 5Is5TK3X34e
--HG--
extra : rebase_source : 02e625fbdaab536d1a787c33edd6dfda9c1039c6
For Stylo development, LLVM packages are required due to Stylo's
extensive use of bindgen--generating Rust bindings to Gecko's C++ code.
While people can install LLVM via their system package manager, we've
opted to download the LLVM packages used on Mozilla infrastructure for
building Gecko. Using Mozilla's packages for LLVM ensures that they
work, and also makes it easier/trivial to integrate support for other
things (e.g. Mozilla's static checkers) into `mach bootstrap`.