From a1dae5154fb036a43d7badb625833c97de18797e Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Mon, 13 Jan 2020 18:52:24 +0100
Subject: [PATCH] [conda] use fetch_index instead of get_index to make sure we
 do not change the caches inside conda! related to #46

---
 bob/devtools/build.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bob/devtools/build.py b/bob/devtools/build.py
index 629f63de..70ee86ac 100644
--- a/bob/devtools/build.py
+++ b/bob/devtools/build.py
@@ -96,13 +96,15 @@ def next_build_number(channel_url, basename):
     (reversed) build-number.
     """
 
-    from conda.exports import get_index
+    from conda.exports import fetch_index
+    from conda.core.index import calculate_channel_urls
 
     remove_conda_loggers()
 
     # get the channel index
-    logger.debug("Downloading channel index from %s", channel_url)
-    index = get_index(channel_urls=[channel_url], prepend=False)
+    channel_urls = calculate_channel_urls([channel_url], prepend=False, use_local=False)
+    logger.debug("Downloading channel index from %s", channel_urls)
+    index = fetch_index(channel_urls=channel_urls)
 
     # remove .tar.bz2/.conda from name, then split from the end twice, on '-'
     if basename.endswith(".tar.bz2"):
-- 
GitLab