@@ -251,13 +251,19 @@ kolla_build_blocks:
251
251
mkdir -p /etc/yum.repos.d.backup && \
252
252
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
253
253
{% endif %}
254
+ echo "===== Before sed modifications I =====" && \
255
+ cat /etc/yum.repos.d/*.repo && \
254
256
{% for repo in stackhpc_yum_repos %}
255
257
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
258
+ -e '/\[baseos\]/,/^\[/ { N; s/^\(baseurl=.*\)\n[ \t]*\(https.*\)/#\1\n#\2/ }' \
256
259
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
257
260
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(metalink *=.*\)/#\1/g' \
258
261
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
259
262
{% endif %}
260
263
{% endfor %}
264
+ RUN \
265
+ echo "===== After sed modifications I =====" && \
266
+ cat /etc/yum.repos.d/*.repo && \
261
267
{% else %}
262
268
RUN \
263
269
rm /etc/apt/sources.list && \
@@ -274,15 +280,18 @@ kolla_build_blocks:
274
280
{# fixme #}
275
281
{% if kolla_base_distro == 'rocky' %}
276
282
&& \
283
+ echo "===== Before sed modifications II =====" && \
284
+ cat /etc/yum.repos.d/*.repo && \
277
285
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
278
286
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
279
287
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
280
288
{% endif %}
281
289
{% for repo in base_centos_repo_overrides_post_yum_list %}
282
290
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
291
+ -e '/\[{{ repo.tag }}\]/,/^\[/ { N; s/^\(baseurl=.*\)\n[ \t]*\(https.*\)/#\1\n#\2/ }' \
283
292
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
284
293
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(metalink *=.*\)/#\1/g' \
285
- -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && {% endif %} \
294
+ -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %}{% endif %} && \
286
295
{% endfor %}
287
296
{% endif %}
288
297
# With the UCA keyring installed we can now add all repos.
0 commit comments