From 57938e16632fd450f00a95af941054c2401ee96f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 17 Jun 2019 19:12:01 -0700 Subject: [PATCH] Add a workaround for a Bodhi bug that's causing problems We're not downloading all the packages from updates that contain more than one builds ATM, which makes the test invalid and has caused some false fails (and may even have caused false passes, though I can't tell yet). Install a fixed Bodhi as a workaround for this. Signed-off-by: Adam Williamson --- lib/utils.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/utils.pm b/lib/utils.pm index 204b0b63..20364950 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -402,6 +402,24 @@ sub _repo_setup_updates { } assert_script_run "cd /opt/update_repo"; assert_script_run "dnf -y install bodhi-client git createrepo koji", 300; + + # FIXME workaround bodhi updates download bug in 4.0.2-1; remove this + # once 4.0.2-2+ goes stable + my $sysrelease = get_var("VERSION"); + my $hdd1; + my $bootfrom; + $hdd1 = get_var("HDD_1"); + $bootfrom = get_var("BOOTFROM"); + $sysrelease = $1 if ($hdd1 =~ /disk_f(\d+)/ && $bootfrom eq 'c'); + if ($sysrelease > 28) { + assert_script_run "mkdir bodhi4022"; + assert_script_run "cd bodhi4022"; + assert_script_run "koji download-build --arch=noarch --arch=x86_64 bodhi-4.0.2-2.fc${sysrelease}"; + assert_script_run "dnf update *.rpm"; + assert_script_run "cd .."; + assert_script_run "rm -rf bodhi4022"; + } + # download the packages if (get_var("ADVISORY")) { # regular update case