I was updating a VirtualBox guest running OL 7.6 using yum update.
# cat /etc/oracle-release
Oracle Linux Server release 7.6
(This is a plain vanilla installation of 7.6 + server GUI)
# ls /etc/yum.repos.d
public-yum-ol7.repo
# yum repolist
Loaded plugins: langpacks, ulninfo
repo id repo name status
ol7_UEKR5/x86_64 Latest Unbreakable Enterprise Kernel Release 5 for Orac 169
ol7_latest/x86_64 Oracle Linux 7Server Latest (x86_64) 15,692
repolist: 15,861
# yum -y update
....
Complete!
Once the update completed successfully:
# /usr/bin/ol_yum_configure.sh
Missing /etc/yum.repos.d/public-yum-ol7.repo. Exiting
# yum repolist
Loaded plugins: langpacks, ulninfo
repolist: 0
Some more info:
# ls -al /etc/yum.repos.d
total 48
drwxr-xr-x. 2 root root 4096 Nov 10 16:40 .
drwxr-xr-x. 142 root root 8192 Nov 10 15:46 ..
-rw-r--r--. 1 root root 1 Nov 6 14:21 .oracle_enable_repolist
-rw-r--r--. 1 root root 3594 Nov 6 14:21 oracle-linux-ol7.repo.disabled
-rw-r--r--. 1 root root 13093 Nov 2 2018 public-yum-ol7.repo.20191106
-rw-r--r--. 1 root root 2116 Nov 6 14:21 uek-ol7.repo.disabled
-rw-r--r--. 1 root root 226 Aug 8 07:02 virt-ol7.repo.disabled
I think the problem are the oraclelinux-release packages:
I checked the package .spec file of 1.0-8 and 1.0.15 and there is some processing done in the pre and post sections of the package, but unfortunately there are no comments to fully understand the logic behind it.
The way I fixed it for now:
# mv uek-ol7.repo.disabled uek-ol7.repo
# mv oracle-linux-ol7.repo.disabled oracle-linux-ol7.repo
# yum repolist
Loaded plugins: langpacks, ulninfo
repo id repo name status
!ol7_UEKR5/x86_64 Latest Unbreakable Enterprise Kernel Release 5 for Ora 169
!ol7_latest/x86_64 Oracle Linux 7Server Latest (x86_64) 15,692
repolist: 15,861
I can reproduce the above issue by restoring a snapshot and doing it again.