mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 13:11:26 +00:00
Adjust repo_setup for add-on Modularity
I believe this should do all the right repo modifications for add-on Modularity (i.e. F28+ Server installs, for now). Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
2c26ce1ede
commit
81540165e8
22
lib/utils.pm
22
lib/utils.pm
@ -331,12 +331,18 @@ sub _repo_setup_compose {
|
|||||||
my $location = get_var("LOCATION");
|
my $location = get_var("LOCATION");
|
||||||
return unless $location;
|
return unless $location;
|
||||||
assert_script_run 'dnf config-manager --set-disabled updates-testing updates';
|
assert_script_run 'dnf config-manager --set-disabled updates-testing updates';
|
||||||
# we use script_run here as the rawhide repo file won't always exist
|
# script_run returns the exit code, so 'unless' here means 'if the file exists'
|
||||||
# and we don't want to bother testing or predicting its existence;
|
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-modular.repo') {
|
||||||
# assert_script_run doesn't buy you much with sed anyway as it'll
|
assert_script_run 'dnf config-manager --set-disabled updates-testing-modular updates-modular';
|
||||||
# return 0 even if it replaced nothing
|
}
|
||||||
|
# we use script_run here as the rawhide and modular repo files
|
||||||
|
# won't always exist and we don't want to bother testing or
|
||||||
|
# predicting their existence; assert_script_run doesn't buy you
|
||||||
|
# much with sed as it'll return 0 even if it replaced nothing
|
||||||
script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Everything/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Everything/source,g' /etc/yum.repos.d/{fedora,fedora-rawhide}.repo", 0;
|
script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Everything/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Everything/source,g' /etc/yum.repos.d/{fedora,fedora-rawhide}.repo", 0;
|
||||||
script_run "cat /etc/yum.repos.d/{fedora,fedora-rawhide}.repo", 0;
|
script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Modular/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Modular/source,g' /etc/yum.repos.d/{fedora-modular,fedora-rawhide-modular}.repo", 0;
|
||||||
|
# this is just for debugging
|
||||||
|
script_run "cat /etc/yum.repos.d/{fedora,fedora-rawhide,fedora-modular,fedora-rawhide-modular}.repo", 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _repo_setup_updates {
|
sub _repo_setup_updates {
|
||||||
@ -368,6 +374,12 @@ sub _repo_setup_updates {
|
|||||||
# this is the easiest workaround, it's not wrong as the repo
|
# this is the easiest workaround, it's not wrong as the repo
|
||||||
# is empty for branched anyway
|
# is empty for branched anyway
|
||||||
assert_script_run "dnf config-manager --set-disabled updates";
|
assert_script_run "dnf config-manager --set-disabled updates";
|
||||||
|
# same for Modular, if appropriate
|
||||||
|
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-modular.repo') {
|
||||||
|
assert_script_run "sed -i -e 's,/releases/,/development/,g' /etc/yum.repos.d/fedora-modular.repo";
|
||||||
|
assert_script_run "dnf config-manager --set-disabled updates-testing-modular";
|
||||||
|
assert_script_run "dnf config-manager --set-disabled updates-modular";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user