aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-04-02 18:49:18 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-04-02 18:55:49 -0400
commit66fbf329846a4a4dbf71e51efb370d56fa3a27a6 (patch)
treef6c8ac94ca80a53acd0a62cec6aac80c11f7890a
parent60f314db6cdeed5099c33763f384378f66487bf1 (diff)
downloadstasis-66fbf329846a4a4dbf71e51efb370d56fa3a27a6.tar.gz
Filter disabled requirements from list
* Temporary bandage. This needs to be its own function, and with real comment detection.
-rw-r--r--src/deliverable.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/deliverable.c b/src/deliverable.c
index dd9d2fe..fb5f4bf 100644
--- a/src/deliverable.c
+++ b/src/deliverable.c
@@ -487,9 +487,23 @@ int delivery_init(struct Delivery *ctx, struct INIFILE *ini, struct INIFILE *cfg
ini_getval(ini, "conda", "conda_packages", INIVAL_TYPE_STR_ARRAY, &val);
conv_strlist(&ctx->conda.conda_packages, LINE_SEP, val);
+ for (size_t i = 0; i < strlist_count(ctx->conda.conda_packages); i++) {
+ char *pkg = strlist_item(ctx->conda.conda_packages, i);
+ if (strpbrk(pkg, ";#")) {
+ strlist_remove(ctx->conda.conda_packages, i);
+ }
+ }
+
ini_getval(ini, "conda", "pip_packages", INIVAL_TYPE_STR_ARRAY, &val);
conv_strlist(&ctx->conda.pip_packages, LINE_SEP, val);
+ for (size_t i = 0; i < strlist_count(ctx->conda.pip_packages); i++) {
+ char *pkg = strlist_item(ctx->conda.pip_packages, i);
+ if (strpbrk(pkg, ";#")) {
+ strlist_remove(ctx->conda.pip_packages, i);
+ }
+ }
+
// Delivery metadata consumed
// Now populate the rules
char missionfile[PATH_MAX] = {0};