Add allowerasing for upgrade if failed without it

Note:
The dnf.log and dnf.rpm.log are already uploaded
to help for investigation.

Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
This commit is contained in:
Michel Normand 2017-02-15 09:20:35 -05:00
parent 47c61b8d21
commit 53f0acea50

View File

@ -15,7 +15,12 @@ sub run {
if ($release eq "rawhide") { if ($release eq "rawhide") {
$params .= " --nogpgcheck"; $params .= " --nogpgcheck";
} }
assert_script_run "dnf ${params} system-upgrade download", 6000;
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.log";
upload_logs "/var/log/dnf.rpm.log"; upload_logs "/var/log/dnf.rpm.log";