1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-11 17:34:23 +00:00

Clean dnf stuff.

This commit is contained in:
Lukas Ruzicka 2018-06-27 09:49:09 +02:00
parent 25b0567558
commit efa70c86fb

View File

@ -7,36 +7,12 @@ sub run {
my $self = shift;
my $release = lc(get_var("VERSION"));
my $relnum = $release;
$self->root_console(tty=>3);
if ($release eq "rawhide") {
$relnum = get_var("RAWREL", "rawhide");
}
# disable screen blanking (download can take a long time)
script_run "setterm -blank 0";
# use compose repo (compose tests) or set up update repo (update tests)
repo_setup();
my $params = "-y --releasever=${relnum}";
if ($release eq "rawhide") {
$params .= " --nogpgcheck";
}
if (script_run "dnf ${params} system-upgrade download", 6000) {
record_soft_failure "dnf failed so retry with --allowerasing";
$params .= " --allowerasing";
assert_script_run "dnf ${params} system-upgrade download", 6000;
}
upload_logs "/var/log/dnf.log";
upload_logs "/var/log/dnf.rpm.log";
script_run "dnf system-upgrade reboot", 0;
# fail immediately if we see a DNF error message, but keep an eye
# out for the bootloader so we can handle it if requested
check_screen ["upgrade_fail", "bootloader"], 15;
die "DNF reported failure" if (match_has_tag "upgrade_fail");
# handle bootloader, if requested; set longer timeout as sometimes
# reboot here seems to take a long time