aboutsummaryrefslogtreecommitdiff
path: root/src/cli
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-06-17 16:24:22 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-06-17 16:24:22 -0400
commitb9cac8cfa9a0ef9138b860c2fa72c6fe51331adf (patch)
tree7ce0503558ede6daf97bc8f6372b638a3a930d50 /src/cli
parent252b9646c1cb0538123d51ced4a733f3dcfc266b (diff)
downloadstasis-b9cac8cfa9a0ef9138b860c2fa72c6fe51331adf.tar.gz
Update micromamba installation logic
* Split installation from micromamba() into micromamba_install() * Return -1 when micromamba cannot be installed * Add stasis.ini option "indexer.micromamba_download_url" * Add global variable micromamba_download_url * The installation function attempts two known-good URLs by default *
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/stasis_indexer/helpers.c5
-rw-r--r--src/cli/stasis_indexer/stasis_indexer_main.c17
2 files changed, 22 insertions, 0 deletions
diff --git a/src/cli/stasis_indexer/helpers.c b/src/cli/stasis_indexer/helpers.c
index 3ef96e4..bdb538d 100644
--- a/src/cli/stasis_indexer/helpers.c
+++ b/src/cli/stasis_indexer/helpers.c
@@ -172,6 +172,11 @@ int micromamba_configure(const struct Delivery *ctx, struct MicromambaInfo *m) {
setenv("PATH", pathvar, 1);
guard_free(pathvar);
+ if (micromamba_install(m)) {
+ SYSERROR("Micromamba installation failed");
+ return -1;
+ }
+
status += micromamba(m, "config prepend --env channels conda-forge");
if (!globals.verbose) {
status += micromamba(m, "config set --env quiet true");
diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c
index 45bbb6c..c13d175 100644
--- a/src/cli/stasis_indexer/stasis_indexer_main.c
+++ b/src/cli/stasis_indexer/stasis_indexer_main.c
@@ -309,6 +309,23 @@ int main(const int argc, char *argv[]) {
printf(BANNER, version, AUTHOR);
guard_free(version);
+ char *cfg_path = NULL;
+ if (asprintf(&cfg_path, "%s/stasis.ini", globals.sysconfdir) < 0) {
+ SYSERROR("Unable to allocate memory for cfg path");
+ exit(1);
+ }
+ ctx._stasis_ini_fp.cfg_path = cfg_path;
+ ctx._stasis_ini_fp.cfg = ini_open(ctx._stasis_ini_fp.cfg_path);
+ if (ctx._stasis_ini_fp.cfg) {
+ if (populate_delivery_cfg(&ctx, INI_READ_RENDER)) {
+ SYSERROR("Unable to apply stasis configuration");
+ exit(1);
+ }
+ }
+ else {
+ SYSWARN("Unable to open stasis configuration file: %s", cfg_path);
+ }
+
indexer_init_dirs(&ctx, workdir);
msg(STASIS_MSG_L1, "%s delivery root %s\n",