mirror of https://github.com/mamba-org/mamba.git
fix: add warning when using defaults (#3434)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Hind Montassif <hind.montassif@gmail.com> Co-authored-by: Johan Mabille <johan.mabille@gmail.com> Co-authored-by: Sylvain Corlay <sylvain.corlay@gmail.com>
This commit is contained in:
parent
12fef58c37
commit
a261cd461d
|
@ -38,6 +38,23 @@ jobs:
|
|||
with:
|
||||
repository: conda-forge/micromamba-feedstock
|
||||
path: micromamba-feedstock
|
||||
- name: Disable output validation
|
||||
if: ${{ matrix.platform == 'osx' }}
|
||||
run: |
|
||||
cd micromamba-feedstock/
|
||||
sed -i '' '/conda_forge_output_validation/d' conda-forge.yml
|
||||
- name: Pin libcurl
|
||||
if: ${{ matrix.platform == 'osx' }}
|
||||
run: |
|
||||
cd micromamba-feedstock/
|
||||
sed -i '' 's/libcurl >=8.4.0/libcurl >=8.4.0,<8.10/g' recipe/meta.yaml
|
||||
sed -i '' 's/libcurl-static >=8.4.0/libcurl-static >=8.4.0,<8.10/g' recipe/meta.yaml
|
||||
- name: Pin libcurl
|
||||
if: ${{ matrix.platform == 'linux' }}
|
||||
run: |
|
||||
cd micromamba-feedstock/
|
||||
sed -i 's/libcurl >=8.4.0/libcurl >=8.4.0,<8.10/g' recipe/meta.yaml
|
||||
sed -i 's/libcurl-static >=8.4.0/libcurl-static >=8.4.0,<8.10/g' recipe/meta.yaml
|
||||
- name: Checkout mamba branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
|||
- cpp-expected
|
||||
- fmt
|
||||
- libarchive
|
||||
- libcurl >=7.86
|
||||
- libcurl >=7.86,<8.10
|
||||
- libsodium
|
||||
- libsolv >=0.7.18
|
||||
- nlohmann_json
|
||||
|
|
|
@ -17,8 +17,8 @@ dependencies:
|
|||
- yaml-cpp-static >=0.8.0
|
||||
- reproc-static >=14.2.4.post0
|
||||
- reproc-cpp-static >=14.2.4.post0
|
||||
- libcurl >=8.4.0
|
||||
- libcurl-static >=8.4.0
|
||||
- libcurl >=8.4.0,<8.10
|
||||
- libcurl-static >=8.4.0,<8.10
|
||||
- xz-static
|
||||
- libssh2-static
|
||||
- libarchive-minimal-static
|
||||
|
|
|
@ -173,6 +173,8 @@ namespace mamba
|
|||
bool always_softlink = false;
|
||||
bool register_envs = true;
|
||||
|
||||
bool show_anaconda_channel_warnings = true;
|
||||
|
||||
// solver options
|
||||
solver::Request::Flags solver_flags = {};
|
||||
|
||||
|
|
|
@ -63,6 +63,16 @@ namespace mamba
|
|||
{
|
||||
for (const auto& platform : channel.platforms())
|
||||
{
|
||||
auto show_warning = ctx.show_anaconda_channel_warnings;
|
||||
auto channel_name = channel.platform_url(platform).host();
|
||||
if (channel_name == "repo.anaconda.com" && show_warning)
|
||||
{
|
||||
LOG_WARNING << "'" << channel_name
|
||||
<< "', a commercial channel hosted by Anaconda.com, is used.\n";
|
||||
LOG_WARNING << "Please make sure you understand Anaconda Terms of Services.\n";
|
||||
LOG_WARNING << "See: https://legal.anaconda.com/policies/en/";
|
||||
}
|
||||
|
||||
auto sdires = SubdirData::create(
|
||||
ctx,
|
||||
channel_context,
|
||||
|
|
|
@ -1660,6 +1660,12 @@ namespace mamba
|
|||
!WARNING: Using this option can result in corruption of long-lived
|
||||
environments due to broken links (deleted cache).)")));
|
||||
|
||||
insert(Configurable("show_anaconda_channel_warnings", &m_context.show_anaconda_channel_warnings)
|
||||
.group("Extract, Link & Install")
|
||||
.set_rc_configurable()
|
||||
.set_env_var_names({ "MAMBA_SHOW_ANACONDA_CHANNEL_WARNINGS" })
|
||||
.description("Show the warning when the Anaconda official channels are used"));
|
||||
|
||||
insert(Configurable("shortcuts", &m_context.shortcuts)
|
||||
.group("Extract, Link & Install")
|
||||
.set_rc_configurable()
|
||||
|
|
|
@ -694,6 +694,7 @@ bind_submodule_impl(pybind11::module_ m)
|
|||
.def_readwrite("local_repodata_ttl", &Context::local_repodata_ttl)
|
||||
.def_readwrite("use_index_cache", &Context::use_index_cache)
|
||||
.def_readwrite("always_yes", &Context::always_yes)
|
||||
.def_readwrite("show_anaconda_channel_warnings", &Context::show_anaconda_channel_warnings)
|
||||
.def_readwrite("dry_run", &Context::dry_run)
|
||||
.def_readwrite("download_only", &Context::download_only)
|
||||
.def_readwrite("add_pip_as_python_dependency", &Context::add_pip_as_python_dependency)
|
||||
|
|
Loading…
Reference in New Issue