Skip to content

Commit d36d035

Browse files
praveenkumaranjannath
authored andcommitted
Replace yum with dnf for package installation
Since we now only support latest 2 releases of RHEL/Centos/Fedora and all distro now have dnf as default installed. We only needed yum for RHEL-7 which is now not supported as per our support matrics.
1 parent 3806625 commit d36d035

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

docs/source/topics/ref_required-software-packages.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Consult the following table to find the command used to install these packages f
88
[options="header"]
99
|====
1010
|Linux Distribution|Installation command
11-
|{fed}|`sudo dnf install NetworkManager`
12-
|{rhel}/{centos}|`su -c 'yum install NetworkManager'`
11+
|{fed}/{rhel}/{centos}|`sudo dnf install NetworkManager`
1312
|{debian}/{ubuntu}|`sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager`
1413
|====

pkg/crc/preflight/preflight_checks_linux.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ func fixLibvirtInstalled(distro *linux.OsRelease) func() error {
159159
}
160160

161161
func installLibvirtCommand(distro *linux.OsRelease) string {
162-
yumCommand := "yum install -y libvirt libvirt-daemon-kvm qemu-kvm"
162+
dnfCommand := "dnf install -y libvirt libvirt-daemon-kvm qemu-kvm"
163163
switch {
164164
case distroIsLike(distro, linux.Ubuntu):
165165
return "apt-get update && apt-get install -y libvirt-daemon libvirt-daemon-system libvirt-clients"
166166
case distroIsLike(distro, linux.Fedora):
167-
return yumCommand
167+
return dnfCommand
168168
default:
169-
logging.Warnf("unsupported distribution %s, trying to install libvirt with yum", distro)
170-
return yumCommand
169+
logging.Warnf("unsupported distribution %s, trying to install libvirt with dnf", distro)
170+
return dnfCommand
171171
}
172172
}
173173

0 commit comments

Comments
 (0)