It was done to include them in `meson subprojects foreach` without
--types argument, but it's better to special case missing --types and
include wraps that have type=None too. It was a bad idea because that
was messing them in `meson subprojects update`, now they are ignored by
that command.
This avoid printing long backtrace by default, the user already has the
output of the git command printed for debugging purpose since we don't
redirect stdout/stderr.
We don't need the legacy variable name system as for dependency()
fallbacks because meson.override_find_program() is largely used already,
so we can just rely on it.
The value for that key must be a coma separated list of dependecy names
provided by that subproject, when no variable name is needed because the
subproject uses override_dependency().
This lets servers know when they're being used by meson. It also avoids
issues where the Independent JPEG Group decided to ban the
"Python-urllib" default user agent.
Fixes https://github.com/mesonbuild/libjpeg/issues/9
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
It can happen that a server is temporaly down, tarballs often have
many mirrors available so we should be able to add at least one fallback
mirror in wrap files.
Reuse the git helper for `meson wrap` and `meson subprojects` so we
don't need to maintain the same git-colors-on-windows workarounds in
multiple places.
`git submodule update --recursive` calls git clone recursively, and on
Windows it will undo the console mode we set in mlog and cause ANSI
colors to stop working. We could set it again only when we call that,
but we will definitely miss other instances where this could happen
in the future and regress.
wrap: add imposter URL test
this test shows that meson wrap subsystem historically allows
imposter URLs like https://wrapdb.mesonwrap.com.evil/v1/foo.zip
while the new code does no.
In my opinion, we should not fall back to http:// from the SSL HSTS WrapDB URL,
**for systems that have Python SSL** as that is controverting the point
of HSTS + SSL.
For systems that do not have Python SSL, they continue to work with a
colored mlog.warning instead of only a stderr console print.
attempt to stop masquerade URLS containing wrapdb.mesonbuild.com.evil.stuff.com
507cf47507cf47 broke the combination of clone-recursive without depth.
Because it passed depth (as None) to git.
To fix this the depth option is now generated once as a list when depth is set
and else set to an empty list and unpacked into the argument this when
needed. This reduces duplication and allows code to work the same for
both cases.
Don't manually emulate a partial `git clone` when `depth` option is not
used. This keeps `git describe` working as before and generally supports
workflows that depend on tags and branches to exist in a wrap downloaded
subproject.
This also fixes downloading via git not working at all on CentOS 7
(git version 1.8.3.1).
For the `depth` case use `git clone --branch=... --depth=...` when
possible and only fall back to manual emulation wraps that specify a
full commit id, because for some reason that does not work with the
clone based workflow.
Fixes: #5991 (Regression in wrap support with git)
* If clone-recursive is specified, populate submodules only after
the specified revision/branch has been checked out. Fixes#4996
* Update submodules recursively on `meson subprojects update`