From 66fbf329846a4a4dbf71e51efb370d56fa3a27a6 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 2 Apr 2024 18:49:18 -0400 Subject: Filter disabled requirements from list * Temporary bandage. This needs to be its own function, and with real comment detection. --- src/deliverable.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') 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}; -- cgit