From c08f08cc997f828e2d0d58673f6e737d947ebefe Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 11 Feb 2025 12:37:54 -0800 Subject: [PATCH] update tests: do main update with --best and fail if it fails We currently use script_run (not assert_script_run) for the catch-all update we run at the start of the test, and don't use --best. This means that if a dependency issue happens at this point, we don't catch it yet, we only catch it in _advisory_post. By using assert_script_run and --best, we can fail on dep issues at this point. We have to keep the _advisory_post check to catch dep issues that crop up *later* in the test, including when things like Cockpit or GNOME Software install updates and we can't force them to use --best logic. But we can at least catch *most* of them earlier this way. Signed-off-by: Adam Williamson --- lib/utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.pm b/lib/utils.pm index 9cdac0b5..c3a06182 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -734,7 +734,7 @@ sub _repo_setup_updates { # where the updated packages should have been installed # 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")); + assert_script_run "dnf -y --best update", 1200 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