aboutsummaryrefslogtreecommitdiff
path: root/src/delivery.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-07-20 11:46:29 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-07-20 11:46:29 -0400
commit14a4a198d55713280648344f8b2a01d6e65092f1 (patch)
tree04cce26181be7bae8bacb0d08731c55709f94d33 /src/delivery.c
parent07dc44efdc5c2fbc2b34c969e623d3b0bc0df15a (diff)
downloadstasis-14a4a198d55713280648344f8b2a01d6e65092f1.tar.gz
Found too many bugs
* Implements a regression test * Moves and completely refactors the envctl code * Allows the user to keep @STR@ values in output files (if you want full control over where external packages comes from post-build) * Fixes wording in a few places * envctl redaction is not implemented yet. The original redaction code hasn't been modified.
Diffstat (limited to 'src/delivery.c')
-rw-r--r--src/delivery.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/delivery.c b/src/delivery.c
index b27ab08..d7b9b99 100644
--- a/src/delivery.c
+++ b/src/delivery.c
@@ -1676,7 +1676,7 @@ void delivery_rewrite_spec(struct Delivery *ctx, char *filename, unsigned stage)
}
remove(tempfile);
guard_free(tempfile);
- } else if (stage == DELIVERY_REWRITE_SPEC_STAGE_2) {
+ } else if (globals.enable_rewrite_spec_stage_2 && stage == DELIVERY_REWRITE_SPEC_STAGE_2) {
// Replace "local" channel with the staging URL
if (ctx->storage.conda_staging_url) {
file_replace_text(filename, "@CONDA_CHANNEL@", ctx->storage.conda_staging_url, 0);
@@ -1684,15 +1684,19 @@ void delivery_rewrite_spec(struct Delivery *ctx, char *filename, unsigned stage)
sprintf(output, "%s/%s/%s/%s/packages/conda", globals.jfrog.url, globals.jfrog.repo, ctx->meta.mission, ctx->info.build_name);
file_replace_text(filename, "@CONDA_CHANNEL@", output, 0);
} else {
- msg(STASIS_MSG_WARN, "conda_staging_url is not configured\n", filename);
- file_replace_text(filename, " - @CONDA_CHANNEL@", "", 0);
+ msg(STASIS_MSG_WARN, "conda_staging_dir is not configured. Using fallback: '%s'\n", ctx->storage.conda_artifact_dir);
+ file_replace_text(filename, "@CONDA_CHANNEL@", ctx->storage.conda_artifact_dir, 0);
}
if (ctx->storage.wheel_staging_url) {
file_replace_text(filename, "@PIP_ARGUMENTS@", ctx->storage.wheel_staging_url, 0);
- } else if (globals.jfrog.repo) {
+ } else if (globals.jfrog.url && globals.jfrog.repo) {
sprintf(output, "--extra-index-url %s/%s/%s/%s/packages/wheels", globals.jfrog.url, globals.jfrog.repo, ctx->meta.mission, ctx->info.build_name);
file_replace_text(filename, "@PIP_ARGUMENTS@", output, 0);
+ } else {
+ msg(STASIS_MSG_WARN, "wheel_staging_dir is not configured. Using fallback: '%s'\n", ctx->storage.wheel_artifact_dir);
+ sprintf(output, "--extra-index-url file://%s", ctx->storage.wheel_artifact_dir);
+ file_replace_text(filename, "@PIP_ARGUMENTS@", output, 0);
}
}
}