From 475b875bc01e942147699519e2a4feea761674eb Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 7 Aug 2023 15:34:20 -0700 Subject: [PATCH] Forcibly install dnf for FEDORA-2023-5fd964c1bf Per https://bodhi.fedoraproject.org/updates/FEDORA-2023-5fd964c1bf#comment-3149533 we kinda need to do this to allow this update through, so long as we're not going to have dnf obsolete dnf5 or anything like that. It's a bit unfortunate but I don't see an alternative. Signed-off-by: Adam Williamson --- lib/utils.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils.pm b/lib/utils.pm index 61b5695e..de0b63f6 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -604,6 +604,11 @@ sub _repo_setup_updates { # already and we want to fail if they weren't, or CANNED # tests, there's no point updating the toolbox script_run "dnf -y update", 1200 unless (get_var("UPGRADE") || get_var("INSTALL") || get_var("CANNED")); + # work around update removing 'dnf' command for the dnf5 + # revert: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5fd964c1bf#comment-3149533 + if (get_var("ADVISORY_OR_TASK") eq "FEDORA-2023-5fd964c1bf") { + script_run "dnf5 -y --best install 'dnf < 5'", 300 unless (get_var("UPGRADE") || get_var("INSTALL") || get_var("CANNED")); + } # on liveinst tests, we'll remove the packages we installed # above (and their deps, which dnf will include automatically), # just in case they're in the update under test; otherwise we