Use dnf instead of yum

I left the instructions for yum-langpacks around, because I'm not sure
how the dnf replacement looks. But all references to yum-the-executable
are gone.

https://fedoraproject.org/wiki/Changes/Retire_YUM_3
https://bugzilla.redhat.com/show_bug.cgi?id=1682910
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-02-26 11:38:44 +01:00
parent 1fa1ac23b2
commit 0d9a3ed849
3 changed files with 15 additions and 15 deletions

View File

@ -137,7 +137,7 @@ echo "Removing firewalld."
# not work when package was installed by Anaconda instead of command line. # not work when package was installed by Anaconda instead of command line.
# Also -- check if this is still even needed with new anaconda -- disabled # Also -- check if this is still even needed with new anaconda -- disabled
# firewall should _not_ pull in this package. # firewall should _not_ pull in this package.
# yum -C -y remove "firewalld*" --setopt="clean_requirements_on_remove=1" # dnf -C -y remove "firewalld*" --setopt="clean_requirements_on_remove=1"
dnf -C -y erase "firewalld*" dnf -C -y erase "firewalld*"
# Another one needed at install time but not after that, and it pulls # Another one needed at install time but not after that, and it pulls

View File

@ -112,12 +112,12 @@ rpm -e linux-firmware
# Remove firewalld; was supposed to be optional in F18+, but is required to # Remove firewalld; was supposed to be optional in F18+, but is required to
# be present for install/image building. # be present for install/image building.
echo "Removing firewalld." echo "Removing firewalld."
yum -C -y remove firewalld --setopt="clean_requirements_on_remove=1" dnf -C -y remove firewalld --setopt="clean_requirements_on_remove=1"
# Another one needed at install time but not after that, and it pulls # Another one needed at install time but not after that, and it pulls
# in some unneeded deps (like, newt and slang) # in some unneeded deps (like, newt and slang)
echo "Removing authconfig." echo "Removing authconfig."
yum -C -y remove authconfig --setopt="clean_requirements_on_remove=1" dnf -C -y remove authconfig --setopt="clean_requirements_on_remove=1"
echo -n "Getty fixes" echo -n "Getty fixes"
# although we want console output going to the serial console, we don't # although we want console output going to the serial console, we don't
@ -176,10 +176,10 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Removing random-seed so it's not the same in every image." echo "Removing random-seed so it's not the same in every image."
rm -f /var/lib/systemd/random-seed rm -f /var/lib/systemd/random-seed
echo "Cleaning old yum repodata." echo "Cleaning old dnf repodata."
yum history new dnf history new
yum clean all dnf clean all
truncate -c -s 0 /var/log/yum.log truncate -c -s 0 /var/log/dnf.log
echo "Import RPM GPG key" echo "Import RPM GPG key"
releasever=$(rpm -q --qf '%{version}\n' fedora-release) releasever=$(rpm -q --qf '%{version}\n' fedora-release)
@ -204,7 +204,7 @@ dd if=/usr/share/syslinux/mbr.bin of=/dev/vda
echo "Fixing SELinux contexts." echo "Fixing SELinux contexts."
touch /var/log/cron touch /var/log/cron
touch /var/log/boot.log touch /var/log/boot.log
mkdir -p /var/cache/yum mkdir -p /var/cache/dnf
/usr/sbin/fixfiles -R -a restore /usr/sbin/fixfiles -R -a restore
echo "Zeroing out empty space." echo "Zeroing out empty space."

View File

@ -103,12 +103,12 @@ rpm -e linux-firmware
# Remove firewalld; was supposed to be optional in F18+, but is required to # Remove firewalld; was supposed to be optional in F18+, but is required to
# be present for install/image building. # be present for install/image building.
echo "Removing firewalld." echo "Removing firewalld."
yum -C -y remove "firewalld*" --setopt="clean_requirements_on_remove=1" dnf -C -y remove "firewalld*" --setopt="clean_requirements_on_remove=1"
# Another one needed at install time but not after that, and it pulls # Another one needed at install time but not after that, and it pulls
# in some unneeded deps (like, newt and slang) # in some unneeded deps (like, newt and slang)
echo "Removing authconfig." echo "Removing authconfig."
yum -C -y remove authconfig --setopt="clean_requirements_on_remove=1" dnf -C -y remove authconfig --setopt="clean_requirements_on_remove=1"
echo -n "Getty fixes" echo -n "Getty fixes"
# although we want console output going to the serial console, we don't # although we want console output going to the serial console, we don't
@ -167,10 +167,10 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Removing random-seed so it's not the same in every image." echo "Removing random-seed so it's not the same in every image."
rm -f /var/lib/systemd/random-seed rm -f /var/lib/systemd/random-seed
echo "Cleaning old yum repodata." echo "Cleaning old dnf repodata."
yum history new dnf history new
yum clean all dnf clean all
truncate -c -s 0 /var/log/yum.log truncate -c -s 0 /var/log/dnf.log
echo "Import RPM GPG key" echo "Import RPM GPG key"
releasever=$(rpm -q --qf '%{version}\n' fedora-release) releasever=$(rpm -q --qf '%{version}\n' fedora-release)
@ -196,7 +196,7 @@ dd if=/usr/share/syslinux/mbr.bin of=/dev/vda
echo "Fixing SELinux contexts." echo "Fixing SELinux contexts."
touch /var/log/cron touch /var/log/cron
touch /var/log/boot.log touch /var/log/boot.log
mkdir -p /var/cache/yum mkdir -p /var/cache/dnf
chattr -i /boot/extlinux/ldlinux.sys chattr -i /boot/extlinux/ldlinux.sys
/usr/sbin/fixfiles -R -a restore /usr/sbin/fixfiles -R -a restore
chattr +i /boot/extlinux/ldlinux.sys chattr +i /boot/extlinux/ldlinux.sys