Revert "Use distro-sync in dnf (fix #576) (#579)" (fix #587)

This reverts commit 76ae636f20.
This commit is contained in:
Roey Darwish Dror
2020-12-21 09:45:28 +02:00
parent d67f52fa4f
commit 8c771d2594

View File

@@ -243,11 +243,13 @@ fn upgrade_redhat(ctx: &ExecutionContext) -> Result<()> {
if let Some(sudo) = &ctx.sudo() { if let Some(sudo) = &ctx.sudo() {
let mut command = ctx.run_type().execute(&sudo); let mut command = ctx.run_type().execute(&sudo);
if let Some(dnf) = Path::new("/usr/bin/dnf-3").if_exists() { command
command.arg(dnf).arg("distro-sync"); .arg(
} else { Path::new("/usr/bin/dnf-3")
command.args(&["/usr/bin/yum", "upgrade"]); .if_exists()
} .unwrap_or_else(|| Path::new("/usr/bin/yum")),
)
.arg("upgrade");
if let Some(args) = ctx.config().dnf_arguments() { if let Some(args) = ctx.config().dnf_arguments() {
command.args(args.split_whitespace()); command.args(args.split_whitespace());