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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-05-01 11:43:44 -07:00 committed by kevin
parent 4a3da58a9e
commit 771db33ea4

View file

@ -118,15 +118,15 @@ createiso_skip = [
{% set repos = '[ {% set repos = '[
[% if request.name == "testing" %] [% if request.name == "testing" %]
[# In the case of testing, also inject the last stable updates #] [# 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 %] [% endif %]
[% if release.version_int == 41 %] [% if release.version_int == 41 %]
[# For F41 the compose location is going to be under /compose/branched/ #] [# 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 %] [% 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 %] [% endif %]
]' %} ]'.format(env_suffix=env_suffix) %}
[% if request.name == 'stable' %] [% if request.name == 'stable' %]
[% set ostreeref = 'updates' %] [% set ostreeref = 'updates' %]