Re-arrange the repo fixups to be a bit clearer and more correct
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
7912648e5b
commit
452140fdbb
39
lib/utils.pm
39
lib/utils.pm
@ -370,6 +370,13 @@ sub _repo_setup_updates_development {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub _repo_setup_updates_28_errors {
|
||||||
|
# fix up some errors in fedora-repos baseurls in F28:
|
||||||
|
# https://pagure.io/fedora-repos/issue/70
|
||||||
|
assert_script_run 'sed -i -e "s,^\(baseurl.*/\)os/$,\1,g" /etc/yum.repos.d/fedora*updates*.repo';
|
||||||
|
assert_script_run 'sed -i -e "s,/testing-modular/,/testing/,g" /etc/yum.repos.d/fedora*updates*.repo';
|
||||||
|
}
|
||||||
|
|
||||||
sub _repo_setup_updates {
|
sub _repo_setup_updates {
|
||||||
# Appropriate repo setup steps for testing a Bodhi update
|
# Appropriate repo setup steps for testing a Bodhi update
|
||||||
# Check if we already ran, bail if so
|
# Check if we already ran, bail if so
|
||||||
@ -379,12 +386,6 @@ sub _repo_setup_updates {
|
|||||||
# have not been updated, and the infra repo is rejected as its
|
# have not been updated, and the infra repo is rejected as its
|
||||||
# metadata checksum isn't known to MM
|
# metadata checksum isn't known to MM
|
||||||
assert_script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^#baseurl,baseurl,g' /etc/yum.repos.d/fedora*.repo";
|
assert_script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^#baseurl,baseurl,g' /etc/yum.repos.d/fedora*.repo";
|
||||||
# fix up some errors in fedora-repos baseurls in F28:
|
|
||||||
# https://pagure.io/fedora-repos/issue/70
|
|
||||||
if (get_var("VERSION") == 28) {
|
|
||||||
assert_script_run 'sed -i -e "s,^\(baseurl.*/\)os/$,\1,g" /etc/yum.repos.d/fedora*updates*.repo';
|
|
||||||
assert_script_run 'sed -i -e "s,/testing-modular/,/testing/,g" /etc/yum.repos.d/fedora*updates*.repo';
|
|
||||||
}
|
|
||||||
if (get_var("OFW")) {
|
if (get_var("OFW")) {
|
||||||
# the uncommented baseurl line must be changed for PowerPC
|
# the uncommented baseurl line must be changed for PowerPC
|
||||||
# from download.fedoraproject.org/pub/fedora/linux/...
|
# from download.fedoraproject.org/pub/fedora/linux/...
|
||||||
@ -392,8 +393,11 @@ sub _repo_setup_updates {
|
|||||||
script_run "sed -i -e 's,/pub/fedora/linux/,/pub/fedora-secondary/,g' /etc/yum.repos.d/fedora*.repo", 0;
|
script_run "sed -i -e 's,/pub/fedora/linux/,/pub/fedora-secondary/,g' /etc/yum.repos.d/fedora*.repo", 0;
|
||||||
}
|
}
|
||||||
# for non-upgrade tests, we want to do the 'development' changes
|
# for non-upgrade tests, we want to do the 'development' changes
|
||||||
# *before* we set up the update repo...
|
# and f28 fixups *before* we set up the update repo...
|
||||||
_repo_setup_updates_development if (get_var("DEVELOPMENT") &! get_var("UPGRADE"));
|
unless (get_var("UPGRADE")) {
|
||||||
|
_repo_setup_updates_development if (get_var("DEVELOPMENT"));
|
||||||
|
_repo_setup_updates_28_errors if (get_var("VERSION") == 28);
|
||||||
|
}
|
||||||
# Set up an additional repo containing the update packages. We do
|
# Set up an additional repo containing the update packages. We do
|
||||||
# this rather than simply running a one-time update because it may
|
# this rather than simply running a one-time update because it may
|
||||||
# be the case that a package from the update isn't installed *now*
|
# be the case that a package from the update isn't installed *now*
|
||||||
@ -405,14 +409,17 @@ sub _repo_setup_updates {
|
|||||||
assert_script_run "dnf -y install bodhi-client git createrepo koji", 300;
|
assert_script_run "dnf -y install bodhi-client git createrepo koji", 300;
|
||||||
# download the packages
|
# download the packages
|
||||||
assert_script_run "bodhi updates download --updateid " . get_var("ADVISORY"), 600;
|
assert_script_run "bodhi updates download --updateid " . get_var("ADVISORY"), 600;
|
||||||
# for upgrade tests, we want to do the 'development' changes *after*
|
# for upgrade tests, we want to do the 'development' changes *after* we
|
||||||
# we set up the update repo
|
# set up the update repo. We don't do the f28 fixups as we don't have
|
||||||
_repo_setup_updates_development if (get_var("DEVELOPMENT") && get_var("UPGRADE"));
|
# f28 fedora-repos.
|
||||||
if (get_var("UPGRADE") && get_var("VERSION") > 27 && get_var("CURRREL") < 28) {
|
if (get_var("UPGRADE")) {
|
||||||
# this gets really ugly, but the repo URLs changed between 27 and
|
_repo_setup_updates_development if (get_var("DEVELOPMENT"));
|
||||||
# 28, so because we're using baseurl not metalink, we need to
|
if ( get_var("VERSION") > 27 && get_var("CURRREL") < 28) {
|
||||||
# fix the locations up when doing upgrade tests to 28...
|
# this gets really ugly, but the repo URLs changed between 27 and
|
||||||
assert_script_run 'sed -i -e "s,/\$releasever/\$basearch/,/\$releasever/Everything/\$basearch/,g" /etc/yum.repos.d/fedora*updates*.repo';
|
# 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';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# this can be used for debugging if something is going wrong
|
# this can be used for debugging if something is going wrong
|
||||||
|
Loading…
Reference in New Issue
Block a user