From a7ec8ada2b05c4b98a29979dc4c060c5da55c431 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 25 Apr 2024 15:29:15 -0700 Subject: [PATCH] container build test: configure for dnf5 When testing the update that implements the dnf5 switchover, we need to patch the kiwi config on the fly for dnf5. Signed-off-by: Adam Williamson --- tests/_container_build_kiwi.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/_container_build_kiwi.pm b/tests/_container_build_kiwi.pm index aec7f041..2dfe8541 100644 --- a/tests/_container_build_kiwi.pm +++ b/tests/_container_build_kiwi.pm @@ -6,6 +6,7 @@ use utils; sub run { my $self = shift; my $version = get_var("VERSION"); + my $advortask = get_var("ADVISORY_OR_TASK"); # we didn't use kiwi before F40, and I don't really want to write # an imgfac test for a release that will be dead in 6 months # FIXME drop when F39 is EOL @@ -76,6 +77,14 @@ sub run { # to mirrorlist assert_script_run 'sed -i -e "s,/usr/share/distribution-gpg-keys/fedora,/etc/pki/rpm-gpg,g" ' . $repoxml; repos_mirrorlist $repoxml; + # configure dnf5 if we're testing the dnf5-as-dnf update + # https://pagure.io/fedora-kiwi-descriptions/pull-request/46 is + # the corresponding PR, drop this once the update is pushed + if ($advortask eq "FEDORA-2024-8a41ea93a2") { + assert_script_run 'sed -i -e "s,dnf,dnf5,g" config.xml'; + assert_script_run 'sed -i -e "s,dnf-yum,yum,g" teams/cloud/container.xml'; + assert_script_run 'sed -i -e "s,dnf-yum,yum,g" teams/cloud/vagrant.xml'; + } # now add the side repo or tag repo to the appropriate repo XML assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n \n \n \n\n" > ' . $repoxml unless ($tag); assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n \n \n \n\n" > ' . $repoxml if ($tag);