From 49faef9c4e0693b46540adcd657c29ebb7b6d663 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Mon, 9 Sep 2019 14:54:30 +0200
Subject: [PATCH] [bootstrap] Use local defaults channel mirror

---
 bob/devtools/bootstrap.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bob/devtools/bootstrap.py b/bob/devtools/bootstrap.py
index d696ab02..f658ee87 100644
--- a/bob/devtools/bootstrap.py
+++ b/bob/devtools/bootstrap.py
@@ -438,7 +438,14 @@ if __name__ == "__main__":
     condarc = os.path.join(args.conda_root, "condarc")
     logger.info("(create) %s", condarc)
     with open(condarc, "wt") as f:
-        f.write(_BASE_CONDARC)
+        # Replaces https://repo.anaconda.com/pkgs/main by
+        # http://www.idiap.ch/software/bob/defaults with so it is optimized for
+        # a CI build.  Notice we consider this script is only executed in this
+        # context.  The URL should NOT work outside of Idiap's network.
+        f.write(_BASE_CONDARC.replace(
+                'https://repo.anaconda.com/pkgs/main',
+                'http://www.idiap.ch/defaults',
+                ))
 
     conda_version = "4"
     conda_build_version = "3.16"
-- 
GitLab