From 771db33ea450757ac3f5984a11dad1a0fdab19a8 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 01 2024 19:48:17 +0000 Subject: Bodhi compose config: fix templating in 'repos' definition You can't nest jinja's templating markers like this, it turns out, they just wind up as literal strings. You also can't use f-strings, sadly (tried it locally, it errors out). We have to use older-style `.format()`, that works. I went with a fairly explicit syntax to make it clear what's going on. Signed-off-by: Adam Williamson --- diff --git a/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 b/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 index 80df5f7..5f33a11 100644 --- a/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 +++ b/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 @@ -118,15 +118,15 @@ createiso_skip = [ {% set repos = '[ [% if request.name == "testing" %] [# In the case of testing, also inject the last stable updates #] - "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/", + "https://kojipkgs{env_suffix}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/", [% endif %] [% if release.version_int == 41 %] [# For F41 the compose location is going to be under /compose/branched/ #] - "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/" + "https://kojipkgs{env_suffix}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/" [% else %] - "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/" + "https://kojipkgs{env_suffix}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/" [% endif %] - ]' %} + ]'.format(env_suffix=env_suffix) %} [% if request.name == 'stable' %] [% set ostreeref = 'updates' %]