aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-10 11:51:43 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-10 11:51:43 -0400
commit910600c428eea68458d7e69e98d2eafd3adc1489 (patch)
tree3e6ca70b8aa409381d33923b52e10a9d50032654
parent1455ef340b1986ddd7e1c519f534ad051308a1ef (diff)
downloadstasis-dry-run-for-real.tar.gz
Force pip to poll the index during the existence checkdry-run-for-real
* Prevent false positivies. If the package isn't on pypi we need to build it.
-rw-r--r--src/lib/core/conda.c3
1 files changed, 2 insertions, 1 deletions
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);
}