yum-plugin-priorities: Which packages are excluded due to repository priority protections?

I am using multiple third party RPM repositories. Since these repos contain packages with conflicting names, I am experimenting with yum-plugin-priorities to sort out the confusion.

When I run yum check-update, I get a notice that 'N packages excluded due to repository priority protections`:

[root@host ~]# yum check-update
Loaded plugins: changelog, downloadonly, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
3941 packages excluded due to repository priority protections
[root@host ~]#

3941 excluded packages? Gosh, that's much more then I was expecting. Is there a quick way for me to check which packages are being excluded from considerations, just so that I can double check what yum is doing?

I tried --disableplugin=priorities, but it doesn't show me the excluded packages.

[root@host ~]# yum check-update --disableplugin=priorities
Loaded plugins: changelog, downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
[root@host ~]#

Solution 1:

It's easier than that :)

The excludes can be shown by using yum debuglevel. They can be seen from debuglevel 3 (debug levels range from 0 to 10)

yum update -d3

gives you the list.

Solution 2:

I'm not sure if there's a quick or builtin way to list what it's excluding, but you can find what you need if you don't mind diving into a bit of code.

The plugin should be located in:

/usr/lib/yum-plugins/priorities.py

The function:

config_hook(conduit)

Will be executed by yum when it reaches the package exclusion slot.

The code is relatively straight forward and you can more information by just inserting print statements in the right place. More specifically, whenever you see

conduit.delPackage(po)

It means that a package is being excluded. Just insert a

print po

in the line above to get a string output of the package.