Sunday, April 27, 2008

'yum-protectbase' vs. RHN

I can't seem to get 'yum-protectbase' to behave correctly with RHEL5's rhnplugin. From `rpm -qi yum-protectbase`:

Description :
This plugin allows certain repositories to be protected. Packages in the protected repositories can't be overridden by packages in non-protected repositories even if the non-protected repo has a later version.

The problem is that, the RHN repositories aren't defined by standard files in '/etc/yum.repos.d/' so I can't add 'protect=1'. The same problem is documented here and here.

[EDIT]: This bug has now been fixed. See my comments on this post for details.

3 comments:

マーク said...

did you discover a solution to this problem?

Rupert Hair said...

I don't think Red Hat have fixed this problem as yet, but I did find a workaround:

For repositories which contain packages that conflict with the base set, I set the 'enabled' option to '0' in the configuration file, and then use the `yum` '--enablerepo' option to selectively enable them when installing packages.

Let me know if this does what you want.

Rupert Hair said...

It looks like Red Hat have fixed this bug in RHEL 5.3:

http://rhn.redhat.com/errata/RHBA-2009-0195.html

"The yum-protectbase plugin is now supported. This allows users to protect
packages from RHN repositories using the 'protect=yes' option in
/etc/yum/pluginconf.d/protectbase.conf."