From 6089ec6c55f112d970f6c7eed545c8c2232c1086 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 3 May 2018 10:00:57 -0700 Subject: [PATCH] More repo baseurl munging, for update upgrade tests to F28 now Now F28 went stable, we're not disabling updates on upgrade any more, and this bug got exposed: the location of the updates and updates-testing repos actually changed between F27 and F28, so the `baseurl` line from fedora-repos in F27 isn't correct for F28. When doing an upgrade from < 28 to > 27, we need to correct the URL when we're done installing stuff from the old release repos but before we start trying to pull stuff from the new release repos. This repo munging crap is really getting fragile, it'd be great if we could get that metadata timing issue resolved so we could reliably use mirrormanager... Signed-off-by: Adam Williamson --- lib/utils.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/utils.pm b/lib/utils.pm index f009a4df..04dad528 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -405,6 +405,12 @@ sub _repo_setup_updates { # for upgrade tests, we want to do the 'development' changes *after* # we set up the update repo _repo_setup_updates_development if (get_var("DEVELOPMENT") && get_var("UPGRADE")); + if (get_var("UPGRADE") && get_var("VERSION") > 27 && get_var("CURRREL") < 28) { + # this gets really ugly, but the repo URLs changed between 27 and + # 28, so because we're using baseurl not metalink, we need to + # fix the locations up when doing upgrade tests to 28... + assert_script_run 'sed -i -e "s,/$releasever/$basearch/,/$releasever/Everything/$basearch/,g" /etc/yum.repos.d/fedora*updates*.repo'; + } # log the exact packages in the update at test time, with their # source packages and epochs. log is uploaded by _advisory_update # and used for later comparison by _advisory_post