From c8004201ae4216c427f260bee9e645305847e897 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 26 2021 01:04:06 +0000 Subject: Update check_install_source checks for anaconda changes Since f33b50e, anaconda doesn't log "enabled repo:" any more. To ensure the repo actually is enabled we need to check some other lines. Good news is, we don't need the 'anaconda'|'' dodge any more, so we can drop that. Signed-off-by: Adam Williamson --- diff --git a/tests/_check_install_source.pm b/tests/_check_install_source.pm index abfced7..099daae 100644 --- a/tests/_check_install_source.pm +++ b/tests/_check_install_source.pm @@ -55,11 +55,15 @@ sub run { # expression at the bash level, and single quotes around the # text 'anaconda' at the level of grep, as the string we're # actually matching on literally has 'anaconda' in it. - # ('anaconda'|'') is a workaround for an anaconda bug that - # happens since 2018-06, can be removed after - # https://github.com/rhinstaller/anaconda/pull/1519 is merged - # and all previous releases go EOL. - assert_script_run 'grep "enabled repo: ' . "\\('anaconda'\\|''\\).*${repourl}" . '" /tmp/packaging.log'; + if (script_run 'grep "enabled repo: ' . "'anaconda'.*${repourl}" . '" /tmp/packaging.log') { + # in F35+, the "enabled repo" log line is gone, instead + # we'll check some log messages from the dnf manager module + # that show up in anaconda.log. Can drop the above branch + # and only go with the below branch after F34 EOL + assert_script_run 'grep "added repo: ' . "'anaconda'.*${repourl}" . '" /tmp/packaging.log'; + assert_script_run 'grep "Load metadata for the ' . "'anaconda'" . '" /tmp/anaconda.log'; + assert_script_run 'grep "Loaded metadata from ' . ".*${repourl}" . '" /tmp/anaconda.log'; + } } if ($repourl) { # check we don't have an error indicating our repo wasn't used.