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:
parent
7be16956d7
commit
74730f904a
11
lib/utils.pm
11
lib/utils.pm
@ -504,13 +504,12 @@ sub disable_updates_repos {
|
|||||||
both => 0,
|
both => 0,
|
||||||
@_
|
@_
|
||||||
);
|
);
|
||||||
my $nonmod = "updates-testing";
|
# FIXME as of 2023-06-20 dnf5 doesn't have config-manager plugin yet :(
|
||||||
$nonmod .= " updates" if ($args{both});
|
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing.repo';
|
||||||
assert_script_run "dnf config-manager --set-disabled $nonmod";
|
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') {
|
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-testing-modular.repo') {
|
||||||
my $mod = "updates-testing-modular";
|
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing-modular.repo';
|
||||||
$mod .= " updates-modular" if ($args{both});
|
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-modular.repo' if ($args{both});
|
||||||
assert_script_run "dnf config-manager --set-disabled $mod";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,12 +10,13 @@ sub run {
|
|||||||
my $relnum = get_release_number;
|
my $relnum = get_release_number;
|
||||||
# use a tty console for repo config and package prep
|
# use a tty console for repo config and package prep
|
||||||
$self->root_console(tty => 3);
|
$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
|
# for update tests, disable koji-rawhide at this point, otherwise
|
||||||
# gnome-software will complain about things being unsigned even
|
# gnome-software will complain about things being unsigned even
|
||||||
# though the repo has gpgcheck=0
|
# though the repo has gpgcheck=0
|
||||||
if (get_var("ADVISORY_OR_TASK") && get_var("VERSION") eq get_var("RAWREL")) {
|
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;
|
prepare_test_packages;
|
||||||
# get back to the desktop
|
# get back to the desktop
|
||||||
|
Loading…
Reference in New Issue
Block a user