From 26b45ecfae8c15f242a9b29abec5a49b9045f97e Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 2 Apr 2024 18:08:56 -0400 Subject: Move system.{arch,platform} template registrations into delivery_init_platform() --- src/deliverable.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/deliverable.c') diff --git a/src/deliverable.c b/src/deliverable.c index bd2634d..cb3487a 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -324,6 +324,12 @@ int delivery_init_platform(struct Delivery *ctx) { setenv("OMC_CONDA_PLATFORM", ctx->system.platform[DELIVERY_PLATFORM_CONDA_INSTALLER], 1); setenv("OMC_CONDA_PLATFORM_SUBDIR", ctx->system.platform[DELIVERY_PLATFORM_CONDA_SUBDIR], 1); + // Register template variables + // These were moved out of main() because we can't take the address of system.platform[x] + // _before_ the array has been initialized. + tpl_register("system.arch", &ctx->system.arch); + tpl_register("system.platform", &ctx->system.platform[DELIVERY_PLATFORM_RELEASE]); + return 0; } -- cgit