diff --git a/conans/client/graph/proxy.py b/conans/client/graph/proxy.py index 8cb149acbf2..a3ef9db76a3 100644 --- a/conans/client/graph/proxy.py +++ b/conans/client/graph/proxy.py @@ -13,6 +13,10 @@ from conans.util.tracer import log_recipe_got_from_local_cache +# TODO: Remove warning message when this URL is no longer available +DEPRECATED_CONAN_CENTER_BINTRAY_URL = "https://conan.bintray.com" + + class ConanProxy(object): def __init__(self, cache, output, remote_manager): # collaborators @@ -113,6 +117,12 @@ def _download_recipe(self, layout, ref, output, remotes, remote, recorder): def _retrieve_from_remote(the_remote): output.info("Trying with '%s'..." % the_remote.name) # If incomplete, resolve the latest in server + if the_remote.url.startswith(DEPRECATED_CONAN_CENTER_BINTRAY_URL): + output.warn("Remote https://conan.bintray.com is deprecated and will be shut down " + "soon.") + output.warn("Please use the new 'conancenter' default remote.") + output.warn("Add it to your remotes with: conan remote add -i 0 conancenter " + "https://center.conan.io") _ref = self._remote_manager.get_recipe(ref, the_remote) output.info("Downloaded recipe revision %s" % _ref.revision) recorder.recipe_downloaded(ref, the_remote.url) diff --git a/conans/test/integration/command/install/install_test.py b/conans/test/integration/command/install/install_test.py index 97d60045f6b..615568c5b65 100644 --- a/conans/test/integration/command/install/install_test.py +++ b/conans/test/integration/command/install/install_test.py @@ -447,3 +447,21 @@ def test_create_cli_override(self, client): "test_package/conanfile.py": GenConanfile().with_test("pass")}) client.run("create . pkg/0.1@ --require-override=zlib/2.0") assert "zlib/2.0: Already installed" in client.out + + +def test_install_bintray_warning(): + server = TestServer(complete_urls=True) + from conans.client.graph import proxy + proxy.DEPRECATED_CONAN_CENTER_BINTRAY_URL = server.fake_url # Mocking! + client = TestClient(servers={"conan-center": server}, + users={"conan-center": [("lasote", "mypass")]}) + client.save({"conanfile.py": GenConanfile()}) + client.run("create . zlib/1.0@lasote/testing") + client.run("upload zlib/1.0@lasote/testing --all -r conan-center") + client.run("remove * -f") + client.run("install zlib/1.0@lasote/testing -r conan-center") + assert "WARN: Remote https://conan.bintray.com is deprecated and will be shut down " \ + "soon" in client.out + client.run("install zlib/1.0@lasote/testing -r conan-center -s build_type=Debug") + assert "WARN: Remote https://conan.bintray.com is deprecated and will be shut down " \ + "soon" not in client.out