1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 21:43:08 +00:00

Workaround config-manager plugin missing from dnf5 using sed

This is ugly, but ought to work, I hope.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-06-20 12:41:52 +02:00
parent 7be16956d7
commit 74730f904a
2 changed files with 8 additions and 8 deletions

View File

@ -504,13 +504,12 @@ sub disable_updates_repos {
both => 0,
@_
);
my $nonmod = "updates-testing";
$nonmod .= " updates" if ($args{both});
assert_script_run "dnf config-manager --set-disabled $nonmod";
# FIXME as of 2023-06-20 dnf5 doesn't have config-manager plugin yet :(
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing.repo';
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates.repo' if ($args{both});
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-testing-modular.repo') {
my $mod = "updates-testing-modular";
$mod .= " updates-modular" if ($args{both});
assert_script_run "dnf config-manager --set-disabled $mod";
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing-modular.repo';
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-modular.repo' if ($args{both});
}
}

View File

@ -10,12 +10,13 @@ sub run {
my $relnum = get_release_number;
# use a tty console for repo config and package prep
$self->root_console(tty => 3);
assert_script_run 'dnf config-manager --set-disabled updates-testing';
disable_updates_repos;
# for update tests, disable koji-rawhide at this point, otherwise
# gnome-software will complain about things being unsigned even
# though the repo has gpgcheck=0
if (get_var("ADVISORY_OR_TASK") && get_var("VERSION") eq get_var("RAWREL")) {
assert_script_run 'dnf config-manager --set-disabled koji-rawhide';
# FIXME as of 2023-06-20 dnf5 doesn't have config-manager plugin yet :(
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/koji-rawhide.repo';
}
prepare_test_packages;
# get back to the desktop