diff --git a/lib/utils.pm b/lib/utils.pm index c892729c..3c70827d 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -413,13 +413,18 @@ sub _repo_setup_updates { upload_logs "/var/log/updatepkgnames.txt"; # create the repo metadata assert_script_run "createrepo ."; - # write a repo config file - assert_script_run 'printf "[advisory]\nname=Advisory repo\nbaseurl=file:///opt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0" > /etc/yum.repos.d/advisory.repo'; + # write a repo config file, unless this is the support_server test + # and it is running on a different release than the update is for + # (in this case we need the repo to exist but do not want to use + # it on the actual support_server system) + unless (get_var("TEST") eq "support_server" && get_var("VERSION") ne get_var("CURRREL")) { + assert_script_run 'printf "[advisory]\nname=Advisory repo\nbaseurl=file:///opt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0" > /etc/yum.repos.d/advisory.repo'; + # run an update now (except for upgrade tests) + script_run "dnf -y update", 600 unless (get_var("UPGRADE")); + } # mark via a variable that we've set up the update/task repo and done # all the logging stuff above set_var('_ADVISORY_REPO_DONE', '1'); - # run an update now (except for upgrade tests) - script_run "dnf -y update", 600 unless (get_var("UPGRADE")); } sub repo_setup { diff --git a/main.pm b/main.pm index 6aff7a24..cefd2e54 100644 --- a/main.pm +++ b/main.pm @@ -276,13 +276,9 @@ sub load_postinstall_tests() { # are checking that an installer image built from the update works and do # not install the update themselves in this manner if (get_var("ADVISORY_OR_TASK") && !get_var("UPGRADE") && !get_var("INSTALL")) { - # don't try and install updates on the support server unless the - # update is for the same release as the support server disk image - if (get_var("TEST") ne "support_server" || get_var("VERSION") eq get_var("CURRREL")) { - autotest::loadtest "tests/_advisory_update.pm"; - # now load the early boot tests again, as _advisory_update reboots - _load_early_postinstall_tests(2); - } + autotest::loadtest "tests/_advisory_update.pm"; + # now load the early boot tests again, as _advisory_update reboots + _load_early_postinstall_tests(2); } # from now on, we have fully installed and booted system with root/specified user logged in @@ -325,9 +321,10 @@ sub load_postinstall_tests() { # do this for INSTALL test(s); these are checking that an installer image # built from the update works and do not install the update themselves. if (get_var("ADVISORY_OR_TASK") && !get_var("INSTALL")) { - # don't try and install updates on the support server unless the - # update is for the same release as the support server disk image - if (get_var("TEST") ne "support_server" || get_var("VERSION") eq get_var("CURRREL")) { + # don't do this for support server unless the update is for the same + # release as the support server disk image, as we don't install the + # updates on support server when they differ + unless (get_var("TEST") eq "support_server" && get_var("VERSION") ne get_var("CURRREL")) { autotest::loadtest "tests/_advisory_post.pm"; } }