From 910600c428eea68458d7e69e98d2eafd3adc1489 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 10 Apr 2026 11:51:43 -0400 Subject: Force pip to poll the index during the existence check * Prevent false positivies. If the package isn't on pypi we need to build it. --- src/lib/core/conda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c index c9be7a3..16483ee 100644 --- a/src/lib/core/conda.c +++ b/src/lib/core/conda.c @@ -151,7 +151,8 @@ int pkg_index_provides(int mode, const char *index, const char *spec) { if (mode == PKG_USE_PIP) { // Do an installation in dry-run mode to see if the package exists in the given index. - strncpy(cmd, "python -m pip install --dry-run --no-cache --no-deps ", sizeof(cmd) - 1); + // The --force argument ignores local installation and cache, and actually polls the remote index(es) + strncpy(cmd, "python -m pip install --force --dry-run --no-cache --no-deps ", sizeof(cmd) - 1); if (index) { snprintf(cmd + strlen(cmd), (sizeof(cmd) - 1) - strlen(cmd), "--index-url='%s' ", index); } -- cgit