Score:0

Cannot get latest-version package from multiple yum repos

in flag

There are two rpm repos in my CentOS 8.1.1911. Details are as follows:

# virt-1.repo
[appstream]
name=CentOS Linux 8-stream - AppStream
baseurl=http://mirrors.ustc.edu.cn/centos/8-stream/AppStream/$basearch/os/
gpgcheck=0
enabled=1
# virt-2.repo
[centos-advanced-virtualization]
name=CentOS Linux 8-stream - Advanced Virtualization
baseurl=http://mirrors.ustc.edu.cn/centos/8-stream/virt/$basearch/advancedvirt-common/
gpgcheck=0
enabled=1

The two repos both contain the package libvirt, and there are newer one in the repo centos-advanced-virtualization. My operation is as follows:

  1. yum clean all && yum makecache
  2. yum list libvirt --showduplicates, but I get the older one from appstream
# yum list libvirt --showduplicates
Last metadata expiration check: 0:00:18 ago on Sun 26 Sep 2021 05:22:42 PM CST.
Available Packages
libvirt.x86_64                                                 6.0.0-35.module_el8.5.0+746+bbd5d70c                                                 appstream
libvirt.x86_64                                                 6.0.0-36.module_el8.5.0+821+97472045                                                 appstream
  1. remove appstream, mv virt-1.repo virt-1.repo.bak && yum makecache
  2. yum list libvirt --showduplicates, and I can get the newer one from centos-advanced-virtualization
# yum list libvirt --showduplicates
Last metadata expiration check: 0:00:30 ago on Sun 26 Sep 2021 05:26:08 PM CST.
Available Packages
libvirt.x86_64                                                  7.0.0-9.el8s                                                   centos-advanced-virtualization
libvirt.x86_64                                                  7.0.0-13.el8s                                                  centos-advanced-virtualization
libvirt.x86_64                                                  7.0.0-14.el8s                                                  centos-advanced-virtualization
libvirt.x86_64                                                  7.4.0-1.el8s                                                   centos-advanced-virtualization
libvirt.x86_64                                                  7.5.0-1.el8s                                                   centos-advanced-virtualization
libvirt.x86_64                                                  7.6.0-2.el8s                                                   centos-advanced-virtualization

So, why can't I get the newer one at the beginning? Did I miss something?

Michael Hampton avatar
cz flag
Update your system to the current CentOS release.
freshMan avatar
in flag
Do I have to do this? Is it a bug?
Michael Hampton avatar
cz flag
You should have been keeping the system up to date the entire time it has been up! Running without installing updates is not supported on CentOS.
freshMan avatar
in flag
Hi Michael. I've upgrade my CentOS to latest version (CentOS Stream 8), but this problem is still there.
Score:1
in flag

I solved this problem from here:

The major reason why DNF wants to install MariaDB from AppStream is that it has a preference for modular packages. Which means, that if specific packages (names) or virtual provides are part of a module, and there are packages with the same names available from other repositories and they are not part of the module, then DNF will always want to install packages from the modular repository.

So, that's why I can't get the latest-version libvirt package. After updating my virt-2.repo as follows, everything is fine:

# virt-2.repo
[centos-advanced-virtualization]
name=CentOS Linux 8-stream - Advanced Virtualization
baseurl=http://mirrors.ustc.edu.cn/centos/8-stream/virt/$basearch/advancedvirt-common/
gpgcheck=0
enabled=1
module_hotfixes=1

I can get latest-version libvirt:

# yum list libvirt --showduplicates
Last metadata expiration check: 0:45:51 ago on Mon 27 Sep 2021 06:53:12 PM CST.
Available Packages
libvirt.x86_64                                              6.0.0-35.module_el8.5.0+746+bbd5d70c                                               appstream     
libvirt.x86_64                                              6.0.0-36.module_el8.5.0+821+97472045                                               appstream     
libvirt.x86_64                                              7.0.0-9.el8s                                                                       Virtualization
libvirt.x86_64                                              7.0.0-13.el8s                                                                      Virtualization
libvirt.x86_64                                              7.0.0-14.el8s                                                                      Virtualization
libvirt.x86_64                                              7.4.0-1.el8s                                                                       Virtualization
libvirt.x86_64                                              7.5.0-1.el8s                                                                       Virtualization
libvirt.x86_64                                              7.6.0-2.el8s                                                                       Virtualization
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.